* fork.cc (fork_parent): Return the cygpid directly derived from the winpid.
This commit is contained in:
parent
1af912ce3c
commit
72067ccafa
@ -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
|
||||
|
@ -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)");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user