From f723909038afc7657b5a19c48d64458ad0dd18d8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 23 Jan 2004 23:05:33 +0000 Subject: * 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. --- winsup/cygwin/dtable.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winsup/cygwin/dtable.h') diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h index 8f3cbea40..16aefa5d2 100644 --- a/winsup/cygwin/dtable.h +++ b/winsup/cygwin/dtable.h @@ -22,7 +22,9 @@ class dtable { muto *lock_cs; fhandler_base **fds; +#ifdef NEWVFORK fhandler_base **fds_on_hold; +#endif fhandler_base **archetypes; unsigned narchetypes; unsigned farchetype; @@ -74,7 +76,9 @@ public: void stdio_init (); void get_debugger_info (); void set_file_pointers_for_exec (); +#ifdef NEWVFORK bool in_vfork_cleanup () {return fds_on_hold == fds;} +#endif fhandler_fifo *find_fifo (ATOM); fhandler_base *find_archetype (device& dev); fhandler_base **add_archetype (); -- cgit v1.2.3