]> andersk Git - openssh.git/commitdiff
- (djm) Cleanup sshpty.c a little
authordjm <djm>
Fri, 12 Oct 2001 09:15:48 +0000 (09:15 +0000)
committerdjm <djm>
Fri, 12 Oct 2001 09:15:48 +0000 (09:15 +0000)
ChangeLog
sshpty.c

index 4d757f6de55510ae59cb77489b6027894fbb683a..f7aaf8a6502a203b2c827cbd7ed524a27a75193b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
      clear select masks if we return before calling select().
  - (djm) "make veryclean" fix from Tom Holroyd <tomh@po.crl.go.jp>
  - (djm) Clean some autoconf-2.52 junk when doing "make distclean"
+ - (djm) Cleanup sshpty.c a little
 
 20011010
  - (djm) OpenBSD CVS Sync
index f88658b80c1224c37c2d9650174178e25b7c97e9..e1e60314109f14da39bab97c4db3d36b240b9b9a 100644 (file)
--- a/sshpty.c
+++ b/sshpty.c
@@ -249,17 +249,20 @@ pty_release(const char *ttyname)
 void
 pty_make_controlling_tty(int *ttyfd, const char *ttyname)
 {
-#ifdef _CRAY
        int fd;
+#ifdef USE_VHANGUP
+       void *old;
+#endif /* USE_VHANGUP */
 
+#ifdef _CRAY
        if (setsid() < 0)
                error("setsid: %.100s", strerror(errno));
 
        fd = open(ttyname, O_RDWR|O_NOCTTY);
        if (fd != -1) {
-               signal(SIGHUP, SIG_IGN);
+               mysignal(SIGHUP, SIG_IGN);
                ioctl(fd, TCVHUP, (char *)NULL);
-               signal(SIGHUP, SIG_DFL);
+               mysignal(SIGHUP, SIG_DFL);
                setpgid(0, 0);
                close(fd);
        } else {
@@ -273,11 +276,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
                error("%.100s: %.100s", ttyname, strerror(errno));
        close(*ttyfd);
                *ttyfd = fd;
-#else
-       int fd;
-#ifdef USE_VHANGUP
-       void *old;
-#endif /* USE_VHANGUP */
+#else /* _CRAY */
 
        /* First disconnect from the old controlling tty. */
 #ifdef TIOCNOTTY
@@ -310,9 +309,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
                error("SETPGRP %s",strerror(errno));
 #endif /* HAVE_NEWS4 */
 #ifdef USE_VHANGUP
-       old = signal(SIGHUP, SIG_IGN);
+       old = mysignal(SIGHUP, SIG_IGN);
        vhangup();
-       signal(SIGHUP, old);
+       mysignal(SIGHUP, old);
 #endif /* USE_VHANGUP */
        fd = open(ttyname, O_RDWR);
        if (fd < 0) {
@@ -333,7 +332,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
        else {
                close(fd);
        }
-#endif
+#endif /* _CRAY */
 }
 
 /* Changes the window size associated with the pty. */
This page took 0.398853 seconds and 5 git commands to generate.