diff options
author | Sam Hartman <hartmans@mit.edu> | 1996-03-25 03:01:48 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 1996-03-25 03:01:48 +0000 |
commit | e70d12329e4a98a2037a77fd36db6eee66854f2f (patch) | |
tree | f3b3bb99411f2bcbbea6ab424e866e7a5b888da8 /src/util/pty/open_ctty.c | |
parent | bd33f7e0f21f90956c686d1a0d7d4cee1afad7bd (diff) | |
download | krb5-e70d12329e4a98a2037a77fd36db6eee66854f2f.tar.gz krb5-e70d12329e4a98a2037a77fd36db6eee66854f2f.tar.xz krb5-e70d12329e4a98a2037a77fd36db6eee66854f2f.zip |
Changes to help streams work correctly on AIX 4.1.4 and HPUX 9.
Adapted loosly from 1837 in krb5-bugs, although I ended up not using
any of Doug's code.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7708 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/pty/open_ctty.c')
-rw-r--r-- | src/util/pty/open_ctty.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/util/pty/open_ctty.c b/src/util/pty/open_ctty.c index b4b9ba97c..00a7eac80 100644 --- a/src/util/pty/open_ctty.c +++ b/src/util/pty/open_ctty.c @@ -1,7 +1,7 @@ /* * pty_open_ctty: Open and establish controlling terminal. * - * Copyright 1995 by the Massachusetts Institute of Technology. + * Copyright 1995, 1996 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby @@ -37,7 +37,7 @@ pty_open_ctty (slave, fd) const char * slave; int *fd; { - int testfd, retval; + int retval; /* First, dissociate from previous terminal */ if ( (retval = ptyint_void_association()) != 0 ) @@ -54,21 +54,9 @@ pty_open_ctty (slave, fd) #ifdef ultrix setpgrp(0, getpid()); #endif -#ifdef ultrix - setpgrp(0, getpid()); -#endif #ifdef TIOCSCTTY ioctl(*fd, TIOCSCTTY, 0); /* Don't check return.*/ #endif /* TIOCSTTY */ - - testfd = open("/dev/tty", O_RDWR|O_NDELAY); - if ( testfd < 0 ) - { - close(*fd); - *fd = -1; - return PTY_OPEN_SLAVE_NOCTTY; - } - close(testfd); return 0; } |