diff options
author | Christopher Faylor <me@cgf.cx> | 2004-01-24 02:05:33 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-01-24 02:05:33 +0300 |
commit | f723909038afc7657b5a19c48d64458ad0dd18d8 (patch) | |
tree | 42581fecc70aca8fff333f8e7808fab4400a6b2b /winsup/cygwin/cygheap.cc | |
parent | 7dddf53f5caee354852156ce552859c0bc81a3c7 (diff) |
* configure.in: Remove NEWVFORK default.
* configure: Regenerate.
* dcrt0.cc: Conditionalize vfork stuff throughout.
* dtable.cc: Ditto.
* perthread.h: Ditto.
* pipe.cc (fhandler_pipe::close): Ditto.
* spawn.cc (spawnve): Ditto.
* syscalls.cc (setsid): Ditto.
* exceptions.cc (sigpacket::process): Use macro to refer to vfork pid.
* debug.cc (verify_handle): Define new function.
* debug.h (VerifyHandle): Define new macro.
(verify_handle): Declare new function
* fhandler.cc (fhandler_base::dup): Verify that dup'ed handle is not supposed
to be in use.
(fhandler_base::set_inheritance): Ditto.
(fhandler_base::fork_fixup): Ditto.
* fhandler_socket.cc (fhandler_socket::dup): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
* net.cc (set_socket_inheritance): Ditto.
* pinfo.cc (pinfo_fixup_after_exec): Ditto.
* sigproc.cc (proc_subproc): Ditto.
(sig_send): Ditto.
* spawn.cc (spawn_guts): Ditto.
* thread.cc (pthread::init_mainthread): Ditto.
* pipe.cc (fhandler_pipe::close): Close read_state with ForceCloseHandle since
it was protected.
(fhandler_pipe::fixup_after_exec): Protect read_state handle.
(fhandler_pipe::dup): Correctly close open handles on error condition. Verify
that dup'ed handle is not supposed to be in use.
(fhandler_pipe::create): Protect read_state.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 0e46c7317..e057f2fee 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -178,6 +178,9 @@ init_cygheap::close_ctty () debug_printf ("closing cygheap->ctty %p", cygheap->ctty); int usecount = cygheap->ctty->usecount; cygheap->ctty->close (); +#ifndef NEWVFORK + cygheap->ctty = NULL; +#else // FIXME: This code ain't right if (cygheap->ctty_on_hold == cygheap->ctty) cygheap->ctty_on_hold = NULL; if (usecount == 1) @@ -185,6 +188,7 @@ init_cygheap::close_ctty () cygheap->ctty = NULL; debug_printf ("setting cygheap->ctty to NULL"); } +#endif } #define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1))) |