You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running lein-gorilla 0.3.1 on cygwin. Executing:
$ lein gorilla
from bash spawns a new bash process, which spawns a bash sub-process, which spawns a java subprocess, which spawns another java subprocess.
bash.exe (original, from which lein gorilla is executed)
bash.exe (new)
- bash.exe (subprocess)
- - java.exe
- - - java.exe
Ctrl+C kills the new bash.exe, the subprocess bash, and the first java.exe, but orphans the last java process.
This becomes a problem when trying to restart gorilla:
$ lein gorilla
Gorilla-REPL: 0.3.1
Started nREPL server on port 53008
Exception in thread "main" java.net.BindException: Address already in use: bind, compiling:(C:\cygwin\tmp\form-init8307404900158704503.clj:1:102)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.httpkit.server.HttpServer.<init>(HttpServer.java:42)
at org.httpkit.server$run_server.invoke(server.clj:8)
at gorilla_repl.core$run_gorilla_server.invoke(core.clj:114)
at user$eval3284.invoke(form-init8307404900158704503.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Manually killing the orphaned java.exe fixes this problem.
The text was updated successfully, but these errors were encountered:
Hmmm, that's not very good! I don't really know enough about how Leiningen spawns processes on Windows to even know how to begin fixing this, but I'll do a bit of Googling :-)
A little more experimentation suggests that this is a leiningen/cygwin problem and not a gorilla problem; an ordinary "$ lein repl" invocation spawn the same tower of processes, and a Ctrl-C still orphans a java process.
I never noticed this since a) I almost always close a repl with Ctrl-D or (exit), and b) it's still possible to start a new repl without killing the orphaned java process
I'm running lein-gorilla 0.3.1 on cygwin. Executing:
from bash spawns a new bash process, which spawns a bash sub-process, which spawns a java subprocess, which spawns another java subprocess.
Ctrl+C kills the new bash.exe, the subprocess bash, and the first java.exe, but orphans the last java process.
This becomes a problem when trying to restart gorilla:
Manually killing the orphaned java.exe fixes this problem.
The text was updated successfully, but these errors were encountered: