Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leiningen - how to kill the child process?

When I launch a webapp with lein run or lein ring server, I get two processes: Leiningen itself, and my app. When I terminate the session with Ctrl+C, it terminates Leiningen and leaves my app running.

How can I terminate both processes or prevent Leiningen from spawning a process?

like image 783
Konrad Garus Avatar asked Mar 30 '12 07:03

Konrad Garus


2 Answers

This sounds like https://github.com/technomancy/leiningen/issues/455 This issue is fixed on the Leiningen master branch, and also is backported to the 1.x series as 1.7.1.

like image 183
trptcolin Avatar answered Sep 28 '22 05:09

trptcolin


What about running lein repl and then start the server by calling your main function from the REPL.

like image 40
Ankur Avatar answered Sep 28 '22 03:09

Ankur