From 3de7be4c1debaa8fcd27f8fc15509179fdb37b9f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 14 May 2012 22:42:56 +0000 Subject: * DevNotes: Add entry cgf-000007. * child_info.h (child_info_spawn::parent_winpid): Declare new field. (child_info_spawn::get_parent_handle): Declare new function. * dcrt0.cc (child_info_spawn::get_parent_handle): Define new function. (child_info_spawn::handle_spawn): Recreate parent handle if possible when dynamically loaded. Don't mess with parent handle if it's NULL. * spawn.cc (child_info_spawn::worker): Set parent_winpid appropriately. --- winsup/cygwin/spawn.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 7e165cf8b..b9ec36f67 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -614,6 +614,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, 0); SetHandleInformation (parent, HANDLE_FLAG_INHERIT, 0); } + parent_winpid = GetCurrentProcessId (); /* When ruid != euid we create the new process under the current original account and impersonate in child, this way maintaining the different -- cgit v1.2.3