From 38cc2e39d056d6bb9e22c329f436cfa75590bb5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 15 May 2014 09:30:02 +0200 Subject: [PATCH] unix: stop child process watcher after last one exits --- src/unix/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }