os/proc-kill
core-api
cfunction
src/core/os.c on line 799, column 1
(os/proc-kill proc &opt wait which)
Kill the subprocess `proc` by sending SIGKILL to it on POSIX
systems, or by closing the process handle on Windows. If `proc` has
already completed, raise an error. If `wait` is truthy, waits for
`proc` to complete and return the exit code (this raises an error
if `proc` is being waited for). Otherwise, return `proc`. Optional
argument `which` is a keyword named after its C counterpart but in
lowercase with the leading SIG stripped. If `which` is provided,
the corresponding signal is sent instead of SIGKILL. `which` is
ignored on Windows.