diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | sshpty.c | 21 |
2 files changed, 12 insertions, 12 deletions
@@ -17,6 +17,7 @@ | |||
17 | clear select masks if we return before calling select(). | 17 | clear select masks if we return before calling select(). |
18 | - (djm) "make veryclean" fix from Tom Holroyd <tomh@po.crl.go.jp> | 18 | - (djm) "make veryclean" fix from Tom Holroyd <tomh@po.crl.go.jp> |
19 | - (djm) Clean some autoconf-2.52 junk when doing "make distclean" | 19 | - (djm) Clean some autoconf-2.52 junk when doing "make distclean" |
20 | - (djm) Cleanup sshpty.c a little | ||
20 | 21 | ||
21 | 20011010 | 22 | 20011010 |
22 | - (djm) OpenBSD CVS Sync | 23 | - (djm) OpenBSD CVS Sync |
@@ -6715,4 +6716,4 @@ | |||
6715 | - Wrote replacements for strlcpy and mkdtemp | 6716 | - Wrote replacements for strlcpy and mkdtemp |
6716 | - Released 1.0pre1 | 6717 | - Released 1.0pre1 |
6717 | 6718 | ||
6718 | $Id: ChangeLog,v 1.1605 2001/10/12 09:15:27 djm Exp $ | 6719 | $Id: ChangeLog,v 1.1606 2001/10/12 09:15:48 djm Exp $ |
@@ -249,17 +249,20 @@ pty_release(const char *ttyname) | |||
249 | void | 249 | void |
250 | pty_make_controlling_tty(int *ttyfd, const char *ttyname) | 250 | pty_make_controlling_tty(int *ttyfd, const char *ttyname) |
251 | { | 251 | { |
252 | #ifdef _CRAY | ||
253 | int fd; | 252 | int fd; |
253 | #ifdef USE_VHANGUP | ||
254 | void *old; | ||
255 | #endif /* USE_VHANGUP */ | ||
254 | 256 | ||
257 | #ifdef _CRAY | ||
255 | if (setsid() < 0) | 258 | if (setsid() < 0) |
256 | error("setsid: %.100s", strerror(errno)); | 259 | error("setsid: %.100s", strerror(errno)); |
257 | 260 | ||
258 | fd = open(ttyname, O_RDWR|O_NOCTTY); | 261 | fd = open(ttyname, O_RDWR|O_NOCTTY); |
259 | if (fd != -1) { | 262 | if (fd != -1) { |
260 | signal(SIGHUP, SIG_IGN); | 263 | mysignal(SIGHUP, SIG_IGN); |
261 | ioctl(fd, TCVHUP, (char *)NULL); | 264 | ioctl(fd, TCVHUP, (char *)NULL); |
262 | signal(SIGHUP, SIG_DFL); | 265 | mysignal(SIGHUP, SIG_DFL); |
263 | setpgid(0, 0); | 266 | setpgid(0, 0); |
264 | close(fd); | 267 | close(fd); |
265 | } else { | 268 | } else { |
@@ -273,11 +276,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
273 | error("%.100s: %.100s", ttyname, strerror(errno)); | 276 | error("%.100s: %.100s", ttyname, strerror(errno)); |
274 | close(*ttyfd); | 277 | close(*ttyfd); |
275 | *ttyfd = fd; | 278 | *ttyfd = fd; |
276 | #else | 279 | #else /* _CRAY */ |
277 | int fd; | ||
278 | #ifdef USE_VHANGUP | ||
279 | void *old; | ||
280 | #endif /* USE_VHANGUP */ | ||
281 | 280 | ||
282 | /* First disconnect from the old controlling tty. */ | 281 | /* First disconnect from the old controlling tty. */ |
283 | #ifdef TIOCNOTTY | 282 | #ifdef TIOCNOTTY |
@@ -310,9 +309,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
310 | error("SETPGRP %s",strerror(errno)); | 309 | error("SETPGRP %s",strerror(errno)); |
311 | #endif /* HAVE_NEWS4 */ | 310 | #endif /* HAVE_NEWS4 */ |
312 | #ifdef USE_VHANGUP | 311 | #ifdef USE_VHANGUP |
313 | old = signal(SIGHUP, SIG_IGN); | 312 | old = mysignal(SIGHUP, SIG_IGN); |
314 | vhangup(); | 313 | vhangup(); |
315 | signal(SIGHUP, old); | 314 | mysignal(SIGHUP, old); |
316 | #endif /* USE_VHANGUP */ | 315 | #endif /* USE_VHANGUP */ |
317 | fd = open(ttyname, O_RDWR); | 316 | fd = open(ttyname, O_RDWR); |
318 | if (fd < 0) { | 317 | if (fd < 0) { |
@@ -333,7 +332,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) | |||
333 | else { | 332 | else { |
334 | close(fd); | 333 | close(fd); |
335 | } | 334 | } |
336 | #endif | 335 | #endif /* _CRAY */ |
337 | } | 336 | } |
338 | 337 | ||
339 | /* Changes the window size associated with the pty. */ | 338 | /* Changes the window size associated with the pty. */ |