diff --git a/src/unix/process.c b/src/unix/process.c index 9d13721e..0aff5fd3 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -512,7 +512,8 @@ int uv_kill(int pid, int signum) { void uv__process_close(uv_process_t* handle) { - /* TODO stop signal watcher when this is the last handle */ QUEUE_REMOVE(&handle->queue); uv__handle_stop(handle); + if (QUEUE_EMPTY(&handle->loop->process_handles)) + uv_signal_stop(&handle->loop->child_watcher); }