* pinfo.cc (_pinfo::set_ctty): Don't copy over existing ctty if it is active.
This commit is contained in:
parent
91ec94b67c
commit
7176387b4f
|
@ -1,3 +1,8 @@
|
||||||
|
2003-12-08 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* pinfo.cc (_pinfo::set_ctty): Don't copy over existing ctty if it is
|
||||||
|
active.
|
||||||
|
|
||||||
2003-12-08 Christopher Faylor <cgf@redhat.com>
|
2003-12-08 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* thread.cc (pthread::precreate): Delete duplicate setting of
|
* thread.cc (pthread::precreate): Delete duplicate setting of
|
||||||
|
|
|
@ -257,7 +257,6 @@ pinfo::set_acl()
|
||||||
void
|
void
|
||||||
_pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *fhctty)
|
_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))
|
if ((ctty < 0 || ctty == tc->ntty) && !(flags & O_NOCTTY))
|
||||||
{
|
{
|
||||||
ctty = tc->ntty;
|
ctty = tc->ntty;
|
||||||
|
@ -277,10 +276,8 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *fhctty)
|
||||||
sid = tc->getsid ();
|
sid = tc->getsid ();
|
||||||
if (tc->getpgid () == 0)
|
if (tc->getpgid () == 0)
|
||||||
tc->setpgid (pgid);
|
tc->setpgid (pgid);
|
||||||
if (fhctty)
|
if (fhctty && !cygheap->ctty.get_io_handle ())
|
||||||
cygheap->ctty = *fhctty;
|
cygheap->ctty = *fhctty;
|
||||||
else if (initial_ctty < 0)
|
|
||||||
assert (cygheap->ctty.get_io_handle () == NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue