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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-08-31 07:34:04 +0400
committerChristopher Faylor <me@cgf.cx>2004-08-31 07:34:04 +0400
commit72067ccafa3de0930b732498408fc62c70de0498 (patch)
tree5045f0b7c9d512bd7aaacc9e7425cc16a50f5299 /winsup
parent1af912ce3c719962b7c368a1813db1af0a032a02 (diff)
* fork.cc (fork_parent): Return the cygpid directly derived from the winpid.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fork.cc9
2 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 286f9a6a2..178ffc68f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-30 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * fork.cc (fork_parent): Return the cygpid directly derived from the
+ winpid.
+
2004-08-30 Christopher Faylor <cgf@timesys.com>
* fork.cc (fork_parent): Record child's pid when we're sure that it has
@@ -11,7 +16,7 @@
2004-08-28 Pierre Humblet <pierre.humblet@ieee.org>
- * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF
+ * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF
before zero filling. Combine similar error handling statements.
2004-08-28 Pierre Humblet <pierre.humblet@ieee.org>
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 0d4241975..1fcca437e 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -500,10 +500,12 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
}
#ifdef DEBUGGING
- pinfo forked ((ch.cygpid != 1 ? ch.cygpid : cygwin_pid (pi.dwProcessId)), 1);
+ int forked_pid = ch.cygpid != 1 ? ch.cygpid : cygwin_pid (pi.dwProcessId);
#else
- pinfo forked (cygwin_pid (pi.dwProcessId), 1);
+ int forked_pid = cygwin_pid (pi.dwProcessId);
#endif
+ pinfo forked (forked_pid, 1);
+
if (!forked)
{
syscall_printf ("pinfo failed");
@@ -512,8 +514,6 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
goto cleanup;
}
- int forked_pid;
-
/* Initialize things that are done later in dll_crt0_1 that aren't done
for the forkee. */
strcpy (forked->progname, myself->progname);
@@ -550,7 +550,6 @@ 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)");