* cygheap.cc (init_cygheap::close_ctty): Don't NULL ctty if it is still active.
This commit is contained in:
parent
001197aee3
commit
49d0c04260
|
@ -1,3 +1,8 @@
|
||||||
|
2004-01-16 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* cygheap.cc (init_cygheap::close_ctty): Don't NULL ctty if it is still
|
||||||
|
active.
|
||||||
|
|
||||||
2004-01-16 Christopher Faylor <cgf@redhat.com>
|
2004-01-16 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* dtable.cc (dtable::vfork_parent_restore): Store ctty_on_hold prior to
|
* dtable.cc (dtable::vfork_parent_restore): Store ctty_on_hold prior to
|
||||||
|
|
|
@ -176,10 +176,15 @@ void
|
||||||
init_cygheap::close_ctty ()
|
init_cygheap::close_ctty ()
|
||||||
{
|
{
|
||||||
debug_printf ("closing cygheap->ctty %p", cygheap->ctty);
|
debug_printf ("closing cygheap->ctty %p", cygheap->ctty);
|
||||||
|
int usecount = cygheap->ctty->usecount;
|
||||||
cygheap->ctty->close ();
|
cygheap->ctty->close ();
|
||||||
if (cygheap->ctty_on_hold == cygheap->ctty)
|
if (cygheap->ctty_on_hold == cygheap->ctty)
|
||||||
cygheap->ctty_on_hold = NULL;
|
cygheap->ctty_on_hold = NULL;
|
||||||
cygheap->ctty = NULL;
|
if (usecount == 1)
|
||||||
|
{
|
||||||
|
cygheap->ctty = NULL;
|
||||||
|
debug_printf ("setting cygheap->ctty to NULL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1)))
|
#define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1)))
|
||||||
|
|
Loading…
Reference in New Issue