Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-05-07 19:05:56 +0400
committerChristopher Faylor <me@cgf.cx>2012-05-07 19:05:56 +0400
commit06bd0ef2ab50252b81344d6810378b18f49c0e9c (patch)
tree706b392427696073753a7abd18e00d5615d5acb7 /winsup/cygwin/pinfo.cc
parent8620cb792502d89d399064ea038d2b32bc611f45 (diff)
* DevNotes: Add entry cgf-000003.
* cygheap.h (init_cygheap::pid_handle): Delete. * dcrt0.cc (child_info_spawn::handle_spawn): Keep parent open if we have execed. * pinfo.cc (pinfo::thisproc): Remove pid_handle manipulations. (pinfo::init): Don't consider a reaped process to be available. * spawn.cc (child_info_spawn::worker): Remove pid_handle manipulations. Make wr_proc_pipe and parent noninheritable when starting a program which doesn't use the Cygwin DLL. Conditionally reset wr_proc_pipe to inheritable if CreateProcess fails. Inject wr_proc_pipe handle into non-Cygwin process. Consider a non-cygwin process to be 'synced'.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index a13100cfc..daed1cc7b 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -77,11 +77,6 @@ pinfo::thisproc (HANDLE h)
else if (!child_proc_info) /* child_proc_info is only set when this process
was started by another cygwin process */
procinfo->start_time = time (NULL); /* Register our starting time. */
- else if (::cygheap->pid_handle)
- {
- ForceCloseHandle (::cygheap->pid_handle);
- ::cygheap->pid_handle = NULL;
- }
}
/* Initialize the process table entry for the current task.
@@ -305,8 +300,9 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
bool created = shloc != SH_JUSTOPEN;
- if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
- && cygwin_pid (procinfo->dwProcessId) != procinfo->pid)
+ if ((procinfo->process_state & PID_REAPED)
+ || ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
+ && cygwin_pid (procinfo->dwProcessId) != procinfo->pid))
{
set_errno (ESRCH);
break;