summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2003-08-25 01:16:21 +0000
committerBen Lindstrom <mouring@eviladmin.org>2003-08-25 01:16:21 +0000
commit5ade9abc37df3dacacbe20104877ca6dab61082a (patch)
treeb3a521b87d93ecc0f1f17f4e659c1d4bf90f86f5 /sshpty.c
parentaf4a6c3a5619299a16cfbb545cde110849596204 (diff)
downloadopenssh-git-5ade9abc37df3dacacbe20104877ca6dab61082a.tar.gz
- (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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sshpty.c b/sshpty.c
index 109fc96a..4747ceaf 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -101,12 +101,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
error("/dev/ptmx: %.100s", strerror(errno));
return 0;
}
- old_signal = mysignal(SIGCHLD, SIG_DFL);
+ old_signal = signal(SIGCHLD, SIG_DFL);
if (grantpt(ptm) < 0) {
error("grantpt: %.100s", strerror(errno));
return 0;
}
- mysignal(SIGCHLD, old_signal);
+ signal(SIGCHLD, old_signal);
if (unlockpt(ptm) < 0) {
error("unlockpt: %.100s", strerror(errno));
return 0;
@@ -274,9 +274,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
fd = open(ttyname, O_RDWR|O_NOCTTY);
if (fd != -1) {
- mysignal(SIGHUP, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
ioctl(fd, TCVHUP, (char *)NULL);
- mysignal(SIGHUP, SIG_DFL);
+ signal(SIGHUP, SIG_DFL);
setpgid(0, 0);
close(fd);
} else {
@@ -323,9 +323,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
error("SETPGRP %s",strerror(errno));
#endif /* HAVE_NEWS4 */
#ifdef USE_VHANGUP
- old = mysignal(SIGHUP, SIG_IGN);
+ old = signal(SIGHUP, SIG_IGN);
vhangup();
- mysignal(SIGHUP, old);
+ signal(SIGHUP, old);
#endif /* USE_VHANGUP */
fd = open(ttyname, O_RDWR);
if (fd < 0) {