File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 422422 (.thenRun (fn []
423423 ; ; To avoid a memory leak remove the hook when the process ends:
424424 (-> (Runtime/getRuntime )
425- (.removeShutdownHook hook))))))))
425+ (.removeShutdownHook hook))
426+ ; ; But run the shutdown hook to ensure that cleanup
427+ ; ; tasks are executed:
428+ (.start hook)
429+ ))))))
426430 (when exit-fn
427431 (if-before-jdk8
428432 (throw (ex-info " The `:exit-fn` option is not support on JDK 8 and lower." res))
479483 - `:cmd` - a vector of the tokens of the command to be executed (e.g. `[\" ls\" \" foo\" ]`)
480484 - `:shutdown`: shutdown hook, defaults to `nil`. Takes process
481485 map. Typically used with `destroy` or `destroy-tree` to ensure long
482- running processes are cleaned up on shutdown.
486+ running processes are cleaned up on shutdown. The shutdown hook is
487+ executed as soon as the child process ends.
483488 - `:exit-fn`: a function which is executed upon exit. Receives process map as argument. Only supported in JDK11+."
484489 {:arglists '([opts? & args])}
485490 [& args]
You can’t perform that action at this time.
0 commit comments