(sh & args)
clojure.java.shell/sh relies on futures to retrieve shell results these futures are still alive at the end of the function which prevents -main / clojure scripts to exit. while (shutdown-agents) / system.exit would work they break other clojure parent processes (i.e. such as cursive repl and others)
hence this 'sh' function is to prevent stale futures since tag does not need them.
clojure.java.shell/sh relies on futures to retrieve shell results these futures are still alive at the end of the function which prevents -main / clojure scripts to exit. while (shutdown-agents) / system.exit would work they break other clojure parent processes (i.e. such as cursive repl and others) hence this 'sh' function is to prevent stale futures since tag does not need them.
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |