diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -108,8 +108,10 @@ 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 | #ifdef SA_RESTART | ||
111 | if (sig == SIGCHLD) | 112 | if (sig == SIGCHLD) |
112 | sa.sa_flags |= SA_RESTART; | 113 | sa.sa_flags |= SA_RESTART; |
114 | #endif | ||
113 | sa.sa_handler = act; | 115 | sa.sa_handler = act; |
114 | if (sigaction(sig, &sa, 0) == -1) | 116 | if (sigaction(sig, &sa, 0) == -1) |
115 | return (mysig_t) -1; | 117 | return (mysig_t) -1; |