-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Currently, the following
> (cmd:cmd& "sleep 17")
#<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {100DB4A553}>
("sleep" "17")
> ,quitleaves 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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels