summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 46cf088c..800588af 100644
--- a/misc.c
+++ b/misc.c
@@ -108,6 +108,8 @@ mysignal(int sig, mysig_t act)
memset(&sa, 0, sizeof sa);
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
+ if (sig == SIGCHLD)
+ sa.sa_flags |= SA_RESTART;
sa.sa_handler = act;
if (sigaction(sig, &sa, 0) == -1)
return (mysig_t) -1;