OpenSSH 2.5.0p1 vs. SA_RESTART
Todd C. Miller
Todd.Miller at courtesan.com
Sun Feb 18 12:02:59 EST 2001
Not all OSes have SA_RESTART (for instance, SunOS does not).
Also, for the non-SA_RESTART case in scp.c sa.sa_flags
was not being initialized (noted by dworkin at village.org).
- todd
--- scp.c.DIST Sat Feb 17 17:56:33 2001
+++ scp.c Sat Feb 17 17:57:59 2001
@@ -1224,8 +1224,9 @@
struct sigaction sa;
sa.sa_handler = updateprogressmeter;
sigemptyset((sigset_t *)&sa.sa_mask);
+ sa.sa_flags = 0;
#ifdef SA_RESTART
- sa.sa_flags = SA_RESTART;
+ sa.sa_flags |= SA_RESTART;
#endif
sigaction(SIGALRM, &sa, NULL);
alarmtimer(1);
--- misc.c.DIST Fri Feb 16 07:58:12 2001
+++ misc.c Sat Feb 17 17:59:53 2001
@@ -108,8 +108,10 @@
memset(&sa, 0, sizeof sa);
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
+#ifdef SA_RESTART
if (sig == SIGCHLD)
sa.sa_flags |= SA_RESTART;
+#endif
sa.sa_handler = act;
if (sigaction(sig, &sa, 0) == -1)
return (mysig_t) -1;
More information about the openssh-unix-dev
mailing list