Open zifeo opened 1 year ago
Duplicate of https://github.com/denoland/deno_task_shell/issues/33?
Following
Just bumped into this as well. My Deno server process is unable to handle SIGTERM
when run using deno task
.
Can this be solved with execv? No because of pipeline. I looked at the code, and, easiest way is to have a global variable acting as pub/sub for signals. Passing it around like Go's sync.Context
also works. I got lost in the async .await call hierarchy. Where in the code is the new process spawned?
Workaround to kill -15 PID
not working: kill -- -PID
Just hit this issue too. I'm trying to spawn a server inside my test files to run API tests but the server never closes.
Same here
Running
deno run -A test.ts
andkill -15 PID
outputs:But
deno task sleep
andkill -15 PID
(with the PID of the deno task runner, not the child deno process) outputs:The child process becomes a ghost, which is a pain to cleanup (e.g. an http server). I would expect deno task to behave like
exec
in bash or forward the signal to the child process.All recent deno versions are affected.