diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -108,6 +108,8 @@ mysignal(int sig, mysig_t act) | |||
108 | memset(&sa, 0, sizeof sa); | 108 | memset(&sa, 0, sizeof sa); |
109 | sigemptyset(&sa.sa_mask); | 109 | sigemptyset(&sa.sa_mask); |
110 | sa.sa_flags = 0; | 110 | sa.sa_flags = 0; |
111 | if (sig == SIGCHLD) | ||
112 | sa.sa_flags |= SA_RESTART; | ||
111 | sa.sa_handler = act; | 113 | sa.sa_handler = act; |
112 | if (sigaction(sig, &sa, 0) == -1) | 114 | if (sigaction(sig, &sa, 0) == -1) |
113 | return (mysig_t) -1; | 115 | return (mysig_t) -1; |