From 6c45657280f40c36826e456ecfff358519ed81dd Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Fri, 7 Jul 2017 16:50:37 +0200 Subject: [PATCH] Reset the SIGCHLD handler after forking a worker to avoid influencing the worker. (#713) --- src/local_scheduler/local_scheduler.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/local_scheduler/local_scheduler.cc b/src/local_scheduler/local_scheduler.cc index 6c4420bd9..617ac3793 100644 --- a/src/local_scheduler/local_scheduler.cc +++ b/src/local_scheduler/local_scheduler.cc @@ -220,6 +220,9 @@ void start_worker(LocalSchedulerState *state, ActorID actor_id) { return; } + /* Reset the SIGCHLD handler so that it doesn't influence the worker. */ + signal(SIGCHLD, SIG_DFL); + char id_string[ID_STRING_SIZE]; ObjectID_to_string(actor_id, id_string, ID_STRING_SIZE); /* Figure out how many arguments there are in the start_worker_command. */