Currently, the following
> (cmd:cmd& "sleep 17")
#<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {100DB4A553}>
("sleep" "17")
> ,quit
leaves the "sleep" process hanging in the background.
It's particularly inconvenient if the process happens to consume a lot of CPU.
Job control can be complicated to implement, so maybe it's out of the scope of this library. Any idea if a Common Lisp job control library already exists?
That said, we could leverage the shell to do job control.
For instance, the following will kill the sleep process when Lisp is exited:
(uiop:launch-program "set -o monitor; sleep 17 & read dummy; kill %1" :input :stream)
The workaround has the benefit of being easy to implement (just need to make sure the command is passed properly to the same).
The downside is that it runs a shell process for each launch-program.
Maybe make it (global) option of cmd?
Thoughts?
Currently, the following
leaves the "sleep" process hanging in the background.
It's particularly inconvenient if the process happens to consume a lot of CPU.
Job control can be complicated to implement, so maybe it's out of the scope of this library. Any idea if a Common Lisp job control library already exists?
That said, we could leverage the shell to do job control.
For instance, the following will kill the
sleepprocess when Lisp is exited:The workaround has the benefit of being easy to implement (just need to make sure the command is passed properly to the same).
The downside is that it runs a shell process for each
launch-program.Maybe make it (global) option of
cmd?Thoughts?