(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 is a website building & hosting documentation for Clojure/Script libraries
× close