* fork.cc (fork_parent): Return the cygpid directly derived from the winpid.

This commit is contained in:
Christopher Faylor 2004-08-31 03:34:04 +00:00
parent 1af912ce3c
commit 72067ccafa
2 changed files with 10 additions and 6 deletions

View File

@ -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>

View File

@ -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)");