unix: stop child process watcher after last one exits

This commit is contained in:
Saúl Ibarra Corretgé 2014-05-15 09:30:02 +02:00
parent 2d5eaea1cd
commit 38cc2e39d0

View File

@ -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);
}