summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/pty/ChangeLog15
-rw-r--r--src/util/pty/configure.in2
-rw-r--r--src/util/pty/initialize_slave.c2
-rw-r--r--src/util/pty/open_ctty.c7
-rw-r--r--src/util/pty/open_slave.c1
5 files changed, 23 insertions, 4 deletions
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 <hartmans@infocalypse>
+
+ * 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 <hartmans@dragons-lair.MIT.EDU>
+
+ * 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 <hartmans@dragons-lair.MIT.EDU>
+
+ * open_ctty.c (pty_open_ctty): Move setpgrp() after void_assoc call
+
Wed Aug 9 00:16:40 1995 Sam Hartman <hartmans@tertius.mit.edu>
* 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