diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -108,13 +108,13 @@ 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 | ||
112 | if (sig == SIGCHLD) | 111 | if (sig == SIGCHLD) |
112 | #if defined(SA_RESTART) | ||
113 | sa.sa_flags |= SA_RESTART; | 113 | sa.sa_flags |= SA_RESTART; |
114 | #endif | 114 | #elif defined(SA_INTERRUPT) |
115 | #ifdef SA_INTERRUPT | ||
116 | if (sig == SIGCHLD) | ||
117 | sa.sa_flags |= SA_INTERRUPT; | 115 | sa.sa_flags |= SA_INTERRUPT; |
116 | #else | ||
117 | ; | ||
118 | #endif | 118 | #endif |
119 | sa.sa_handler = act; | 119 | sa.sa_handler = act; |
120 | if (sigaction(sig, &sa, NULL) == -1) | 120 | if (sigaction(sig, &sa, NULL) == -1) |