diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2003-08-25 01:16:21 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2003-08-25 01:16:21 +0000 |
commit | 5ade9abc37df3dacacbe20104877ca6dab61082a (patch) | |
tree | b3a521b87d93ecc0f1f17f4e659c1d4bf90f86f5 /sshpty.c | |
parent | af4a6c3a5619299a16cfbb545cde110849596204 (diff) |
- (bal) redo how we handle 'mysignal()'. Move it to
openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to
be our 'mysignal' by default. OK djm@
Diffstat (limited to 'sshpty.c')
-rw-r--r-- | sshpty.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -101,12 +101,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
101 | error("/dev/ptmx: %.100s", strerror(errno)); | 101 | error("/dev/ptmx: %.100s", strerror(errno)); |
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | old_signal = mysignal(SIGCHLD, SIG_DFL); | 104 | old_signal = signal(SIGCHLD, SIG_DFL); |
105 | if (grantpt(ptm) < 0) { | 105 | if (grantpt(ptm) < 0) { |
106 | error("grantpt: %.100s", strerror(errno)); | 106 | error("grantpt: %.100s", strerror(errno)); |
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | mysignal(SIGCHLD, old_signal); | 109 | signal(SIGCHLD, old_signal); |
110 | if (unlockpt(ptm) < 0) { | 110 | if (unlockpt(ptm) < 0) { |
111 | error("unlockpt: %.100s", strerror(errno)); | 111 | error("unlockpt: %.100s", strerror(errno)); |
112 | return 0; | 112 | return 0; |
@@ -274,9 +274,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
274 | 274 | ||
275 | fd = open(ttyname, O_RDWR|O_NOCTTY); | 275 | fd = open(ttyname, O_RDWR|O_NOCTTY); |
276 | if (fd != -1) { | 276 | if (fd != -1) { |
277 | mysignal(SIGHUP, SIG_IGN); | 277 | signal(SIGHUP, SIG_IGN); |
278 | ioctl(fd, TCVHUP, (char *)NULL); | 278 | ioctl(fd, TCVHUP, (char *)NULL); |
279 | mysignal(SIGHUP, SIG_DFL); | 279 | signal(SIGHUP, SIG_DFL); |
280 | setpgid(0, 0); | 280 | setpgid(0, 0); |
281 | close(fd); | 281 | close(fd); |
282 | } else { | 282 | } else { |
@@ -323,9 +323,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
323 | error("SETPGRP %s",strerror(errno)); | 323 | error("SETPGRP %s",strerror(errno)); |
324 | #endif /* HAVE_NEWS4 */ | 324 | #endif /* HAVE_NEWS4 */ |
325 | #ifdef USE_VHANGUP | 325 | #ifdef USE_VHANGUP |
326 | old = mysignal(SIGHUP, SIG_IGN); | 326 | old = signal(SIGHUP, SIG_IGN); |
327 | vhangup(); | 327 | vhangup(); |
328 | mysignal(SIGHUP, old); | 328 | signal(SIGHUP, old); |
329 | #endif /* USE_VHANGUP */ | 329 | #endif /* USE_VHANGUP */ |
330 | fd = open(ttyname, O_RDWR); | 330 | fd = open(ttyname, O_RDWR); |
331 | if (fd < 0) { | 331 | if (fd < 0) { |