From e1736c2f135a31a8882199169c2dfc5a99f7ce1b Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 24 Dec 2004 18:31:23 +0000 Subject: * child_info.h (CURR_CHILD_INFO_MAGIC): Update. (child_info::parent_wr_proc_pipe): Eliminate. * pinfo.h (_pinfo::alert_parent): Move here from pinfo class. (_pinfo::dup_proc_pipe): New method. (_pinfo::sync_proc_pipe): Ditto. * exceptions.cc (sig_handle_tty_stop): Reflect move of alert_parent. * init.cc (dll_entry): Exit with status one if main process called ExitProcess. * pinfo.cc (set_myself): Remove handling of parent_wr_proc_pipe. (_pinfo::exit): Reflect move of alert_parent. Set procinfo to NULL to flag that we are exiting normally. Always use exitcode when exiting (although this could be a little racy). (pinfo::init): Set default exit to SIGTERM. This will be the exit code reported if process is terminated. (_pinfo::dup_proc_pipe): New function. (pinfo::wait): Duplicate wr_proc_pipe to the right place. Use dup_proc_pipe to move the pipe to the child. (_pinfo::sync_proc_pipe): New function. (_pinfo::alert_parent): Move to _pinfo. Make sure that wr_proc_pipe is ours before using it. * sigproc.cc (child_info::child_info): Remove handling of parent_wr_proc_pipe. * spawn.cc (spawn_guts): Pass our wr_proc_pipe to the child when execing. Ensure that exit code of cygwin process started from windows is correctly set. --- winsup/cygwin/sigproc.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 934988d87..b5a281530 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -735,8 +735,6 @@ child_info::child_info (unsigned in_cb, child_info_types chtype) if (chtype != PROC_SPAWN) subproc_ready = CreateEvent (&sec_all, FALSE, FALSE, NULL); sigproc_printf ("subproc_ready %p", subproc_ready); - if (chtype != PROC_EXEC && myself->wr_proc_pipe != INVALID_HANDLE_VALUE) - parent_wr_proc_pipe = myself->wr_proc_pipe; } child_info::~child_info () -- cgit v1.2.3