diff options
author | Damien Miller <djm@mindrot.org> | 2001-02-18 15:18:43 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-02-18 15:18:43 +1100 |
commit | 722ccb1492a5f3aaa71eacc97a684e82d13df07b (patch) | |
tree | e1c236138f8458e579d13306d23a36280ee96d40 /misc.c | |
parent | 93c17d9eed2643e1f5ab4d2a5de46e5c7fd0fb93 (diff) |
- (djm) SA_INTERRUPT is the converse of SA_RESTART, apply it only for
SIGALRM.
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) memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_flags = 0; - if (sig == SIGCHLD) #if defined(SA_RESTART) + if (sig == SIGCHLD) sa.sa_flags |= SA_RESTART; -#elif defined(SA_INTERRUPT) +#endif +#if defined(SA_INTERRUPT) + if (sig == SIGALRM) sa.sa_flags |= SA_INTERRUPT; -#else - ; #endif sa.sa_handler = act; if (sigaction(sig, &sa, NULL) == -1) |