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>2004-08-31 02:08:50 +0400
committerChristopher Faylor <me@cgf.cx>2004-08-31 02:08:50 +0400
commit1af912ce3c719962b7c368a1813db1af0a032a02 (patch)
tree0b9160593fbb25c71890ccce3c6d110704ef8ed0 /winsup/cygwin/fork.cc
parentebc58bf810ed7dd3eeb31308438dca34cc248a7c (diff)
* fork.cc (fork_parent): Record child's pid when we're sure that it has been
filled out by the child. * pinfo.cc (pinfo::init): Trivial change.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 0103b0dd3..0d4241975 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -514,8 +514,6 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
int forked_pid;
- forked_pid = forked->pid;
-
/* Initialize things that are done later in dll_crt0_1 that aren't done
for the forkee. */
strcpy (forked->progname, myself->progname);
@@ -552,6 +550,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
if (!sync_with_child (pi, subproc_ready, true, "waiting for longjmp"))
goto cleanup;
+ forked_pid = forked->pid;
/* CHILD IS STOPPED */
debug_printf ("child is alive (but stopped)");