diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-09 03:27:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-09 03:27:05 +0000 |
commit | 7176387b4fadccb76d53f2298cddcca1cad331b5 (patch) | |
tree | 45f0f4d6c2074a2501061b4bb959f7846afe7b31 /winsup/cygwin/pinfo.cc | |
parent | 91ec94b67c7470b2c3bdcfae3301087fbd1fa4b8 (diff) | |
download | newlib-7176387b4fadccb76d53f2298cddcca1cad331b5.zip newlib-7176387b4fadccb76d53f2298cddcca1cad331b5.tar.gz newlib-7176387b4fadccb76d53f2298cddcca1cad331b5.tar.bz2 |
* pinfo.cc (_pinfo::set_ctty): Don't copy over existing ctty if it is active.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index b0f58b4..dfd140f 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -257,7 +257,6 @@ pinfo::set_acl() void _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *fhctty) { - int initial_ctty = ctty; if ((ctty < 0 || ctty == tc->ntty) && !(flags & O_NOCTTY)) { ctty = tc->ntty; @@ -277,10 +276,8 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *fhctty) sid = tc->getsid (); if (tc->getpgid () == 0) tc->setpgid (pgid); - if (fhctty) + if (fhctty && !cygheap->ctty.get_io_handle ()) cygheap->ctty = *fhctty; - else if (initial_ctty < 0) - assert (cygheap->ctty.get_io_handle () == NULL); } } |