diff options
author | stevesk <stevesk> | 2001-06-15 02:10:41 +0000 |
---|---|---|
committer | stevesk <stevesk> | 2001-06-15 02:10:41 +0000 |
commit | 6dfbf6600748f184a6e6ec02195ab0081ce472ee (patch) | |
tree | 2de368db01c6d07e0bc8b093ec4f89c34fb4477e | |
parent | 0a569450cf7d83742b4dab381d0292335d0a109a (diff) | |
download | openssh-6dfbf6600748f184a6e6ec02195ab0081ce472ee.tar.gz |
- (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
around grantpt().
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | misc.c | 4 | ||||
-rw-r--r-- | sshpty.c | 4 |
3 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,7 @@ +20010615 + - (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL + around grantpt(). + 20010614 - (bal) Applied X11 Cookie Patch. X11 Cookie behavior has changed to no longer use /tmp/ssh-XXXXX/ @@ -5310,4 +5314,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1179.2.16 2001/06/13 19:18:04 mouring Exp $ +$Id: ChangeLog,v 1.1179.2.17 2001/06/15 02:10:41 stevesk Exp $ @@ -143,10 +143,6 @@ mysignal(int sig, mysig_t act) memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_flags = 0; -#if defined(SA_RESTART) - if (sig == SIGCHLD) - sa.sa_flags |= SA_RESTART; -#endif #if defined(SA_INTERRUPT) if (sig == SIGALRM) sa.sa_flags |= SA_INTERRUPT; @@ -20,6 +20,7 @@ RCSID("$OpenBSD: sshpty.c,v 1.1 2001/03/04 01:46:30 djm Exp $"); #include "sshpty.h" #include "log.h" +#include "misc.h" /* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */ #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY) @@ -93,16 +94,19 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) */ int ptm; char *pts; + mysig_t old_signal; ptm = open("/dev/ptmx", O_RDWR | O_NOCTTY); if (ptm < 0) { error("/dev/ptmx: %.100s", strerror(errno)); return 0; } + old_signal = mysignal(SIGCHLD, SIG_DFL); if (grantpt(ptm) < 0) { error("grantpt: %.100s", strerror(errno)); return 0; } + mysignal(SIGCHLD, old_signal); if (unlockpt(ptm) < 0) { error("unlockpt: %.100s", strerror(errno)); return 0; |