diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-22 02:02:39 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-22 02:02:39 +0200 |
commit | 47d84679d6fe71f56d3a013578007dff92ff72db (patch) | |
tree | 810b4eacd188bdc53a861a116678245c321093de /src/fastd.c | |
parent | 956e414d7baa56198a583adf130798cbe80f6cb9 (diff) | |
download | fastd-47d84679d6fe71f56d3a013578007dff92ff72db.tar fastd-47d84679d6fe71f56d3a013578007dff92ff72db.zip |
Fix waitpid race condition
Doing a waitpid for all processes in the SIGCHLD handler could sometimes steal
a signal from a fastd_shell_command_exec_sync call. To fix this, don't reap the
children in the SIGCHLD handler anymore, but create a reaper thread for each
asynchronous shell command.
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c index 0d487bd..016e5f1 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -78,7 +78,6 @@ static void on_sigusr1(int signo UNUSED) { } static void on_sigchld(int signo UNUSED) { - while (waitpid(-1, NULL, WNOHANG) > 0) {} } static void init_signals(void) { |