From: Sam Hartman Date: Fri, 11 Aug 1995 19:48:16 +0000 (+0000) Subject: Changes for Solaris and Ultrix X-Git-Tag: krb5-1.0-beta6~1324 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6f715063305698a2c535f6c072c81498fa7e8b0b;p=krb5.git Changes for Solaris and Ultrix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6508 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index cb95266bd..0a3ae4167 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,18 @@ +Fri Aug 11 01:12:03 1995 Sam Hartman + + * initialize_slave.c (pty_initialize_slave): You really do need to + push and pop the streams on a Sun. + +Fri Aug 11 00:49:23 1995 Sam Hartman + + * configure.in (ac_cv_func_setsid): Pretend that Ultrix doesn't + have setsid, because if it does make the call then the pty never + becomes controlling tty. + +Thu Aug 10 09:47:07 1995 Sam Hartman + + * open_ctty.c (pty_open_ctty): Move setpgrp() after void_assoc call + Wed Aug 9 00:16:40 1995 Sam Hartman * pty-int.h (VHANG_first): Change defines so VHANG_FIRST doesn't diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index cdb8f55cc..7829d98e3 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -15,7 +15,9 @@ dnl login. dnl case $krb5_cv_host in *-*-ultrix*) +echo "Disabling initial vhangup and setsid because they break under Ultrix..." AC_DEFINE([OPEN_CTTY_ONLY_ONCE],[1]) +ac_cv_func_setsid=no # setsid doesn't do the right thing under Ultrix even though present ;; *-*-aix3*) # AIX has streams include files but not streams TTY diff --git a/src/util/pty/initialize_slave.c b/src/util/pty/initialize_slave.c index 861770407..d10c9c852 100644 --- a/src/util/pty/initialize_slave.c +++ b/src/util/pty/initialize_slave.c @@ -47,7 +47,7 @@ long pty_initialize_slave (fd) return PTY_OPEN_SLAVE_LINE_PUSHFAIL; } #else /*No line_push */ -#if 0 /* used to be SUN*/ +#ifdef sun if (ioctl(fd, I_PUSH, "ptem") < 0) return PTY_OPEN_SLAVE_PUSH_FAIL; if (ioctl(fd, I_PUSH, "ldterm") < 0) diff --git a/src/util/pty/open_ctty.c b/src/util/pty/open_ctty.c index 6ef9c7409..c54c6f106 100644 --- a/src/util/pty/open_ctty.c +++ b/src/util/pty/open_ctty.c @@ -42,14 +42,15 @@ pty_open_ctty (slave, fd) (void) setsid(); #endif +/* First, dissociate from previous terminal */ + if ( (retval = ptyint_void_association()) != 0 ) + return retval; #ifdef ultrix /* The Ultrix (and other BSD tty drivers) require the process group * to be zero, in order to acquire the new tty as a controlling tty. */ (void) setpgrp(0, 0); #endif -/* First, dissociate from previous terminal */ - if ( (retval = ptyint_void_association()) < 0 ) - return retval; + *fd = open(slave, O_RDWR); if (*fd < 0 ) return PTY_OPEN_SLAVE_OPENFAIL; diff --git a/src/util/pty/open_slave.c b/src/util/pty/open_slave.c index 37d580d23..d7c94dcba 100644 --- a/src/util/pty/open_slave.c +++ b/src/util/pty/open_slave.c @@ -36,6 +36,7 @@ long retval; #endif + /* First, chmod and chown the slave*/ /* * If we have vhangup then we really need pty_open_ctty to make sure