summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/sshpty.c b/sshpty.c
index fe2fb5aa2..4da84d05f 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -100,30 +100,6 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
100{ 100{
101 int fd; 101 int fd;
102 102
103#ifdef _UNICOS
104 if (setsid() < 0)
105 error("setsid: %.100s", strerror(errno));
106
107 fd = open(tty, O_RDWR|O_NOCTTY);
108 if (fd != -1) {
109 signal(SIGHUP, SIG_IGN);
110 ioctl(fd, TCVHUP, (char *)NULL);
111 signal(SIGHUP, SIG_DFL);
112 setpgid(0, 0);
113 close(fd);
114 } else {
115 error("Failed to disconnect from controlling tty.");
116 }
117
118 debug("Setting controlling tty using TCSETCTTY.");
119 ioctl(*ttyfd, TCSETCTTY, NULL);
120 fd = open("/dev/tty", O_RDWR);
121 if (fd < 0)
122 error("%.100s: %.100s", tty, strerror(errno));
123 close(*ttyfd);
124 *ttyfd = fd;
125#else /* _UNICOS */
126
127 /* First disconnect from the old controlling tty. */ 103 /* First disconnect from the old controlling tty. */
128#ifdef TIOCNOTTY 104#ifdef TIOCNOTTY
129 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY); 105 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
@@ -167,7 +143,6 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
167 strerror(errno)); 143 strerror(errno));
168 else 144 else
169 close(fd); 145 close(fd);
170#endif /* _UNICOS */
171} 146}
172 147
173/* Changes the window size associated with the pty. */ 148/* Changes the window size associated with the pty. */