diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2258,8 +2258,10 @@ ssh_signal(int signum, sshsig_t handler) | |||
2258 | memset(&sa, 0, sizeof(sa)); | 2258 | memset(&sa, 0, sizeof(sa)); |
2259 | sa.sa_handler = handler; | 2259 | sa.sa_handler = handler; |
2260 | sigfillset(&sa.sa_mask); | 2260 | sigfillset(&sa.sa_mask); |
2261 | #if defined(SA_RESTART) && !defined(NO_SA_RESTART) | ||
2261 | if (signum != SIGALRM) | 2262 | if (signum != SIGALRM) |
2262 | sa.sa_flags = SA_RESTART; | 2263 | sa.sa_flags = SA_RESTART; |
2264 | #endif | ||
2263 | if (sigaction(signum, &sa, &osa) == -1) { | 2265 | if (sigaction(signum, &sa, &osa) == -1) { |
2264 | debug3("sigaction(%s): %s", strsignal(signum), strerror(errno)); | 2266 | debug3("sigaction(%s): %s", strsignal(signum), strerror(errno)); |
2265 | return SIG_ERR; | 2267 | return SIG_ERR; |