* dcrt0.cc (dll_crt0_1): Move set_os_type.
(_dll_crt0): To here. (cygwin_dll_init): And here. * external.cc (fillout_pinfo): Use more foolproof method for scanning for pids. * pinfo.cc (set_myself): Eliminate myself_identity.init. * sigproc.cc (wait_sig): Do it here instead to reduce the amount of time where there could potentially be two processes with the same pid. * spawn.cc (spawn_guts): Eliminate duplicate initialization. * include/sys/cygwin.h: Mark unused PID_* elements.
This commit is contained in:
@@ -1202,6 +1202,11 @@ wait_sig (VOID *)
|
||||
if (!SetEvent (child_proc_info->subproc_ready))
|
||||
system_printf ("SetEvent (subproc_ready) failed, %E");
|
||||
ForceCloseHandle (child_proc_info->subproc_ready);
|
||||
/* Initialize an "indirect" pid block so that if someone looks up this
|
||||
process via its Windows PID it will be redirected to the appropriate
|
||||
Cygwin PID shared memory block. */
|
||||
static pinfo NO_COPY myself_identity;
|
||||
myself_identity.init (cygwin_pid (myself->dwProcessId), PID_EXECED);
|
||||
}
|
||||
|
||||
SetEvent (wait_sig_inited);
|
||||
|
Reference in New Issue
Block a user