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:
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index c65e7bb37..2dfec5a0b 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -207,7 +207,6 @@ proc_subproc (DWORD what, uintptr_t val)
case PROC_DETACHED_CHILD:
if (vchild != myself)
{
- vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid;
vchild->uid = myself->uid;
vchild->gid = myself->gid;
vchild->pgid = myself->pgid;
@@ -215,6 +214,7 @@ proc_subproc (DWORD what, uintptr_t val)
vchild->ctty = myself->ctty;
vchild->cygstarted = true;
vchild->process_state |= PID_INITIALIZING;
+ vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid; /* always set last */
}
if (what == PROC_DETACHED_CHILD)
break;