From e8454a340033a287a9245e049a6f23eb68ec7f95 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 17 Jul 2005 00:51:03 +0000 Subject: * child_info.h (child_info::sync): Pass pid and HANDLE rather than using pinfo. (child_info::child_info): Accept an argument controlling whether to create proc_subproc. (child_info_spawn::child_info_spawn): Ditto. * sigproc.cc (child_info::child_info): Ditto. (child_info_spawn::child_info_spawn): Ditto. (child_info::sync): Use passed in pid and HANDLE. * fork.cc (fork_parent): Reflect additional arguments required for child_info::sync. * hookapi.cc (hook_or_detect_cygwin): Rename. Change so that NULL 'fn' argument just returns "true", indicating that program uses cygwin1.dll. * spawn.cc (av::win16_exe): New element. * spawn.cc (av::iscygwin): New element. (av::fixup): New function. (spawn_guts): Protect against SEGV. Use fixup function to detect when it is safe to wait for a spawned (as opposed to an execed) program. Reflect changes in child_info::sync arguments. * external.cc (cygwin_internal): Reflect function renaming to hook_or_detect_cygwin. * cygheap.cc (cygheap_fixup_in_child): Close handle after debug fixup has been done to prevent false positives in handle collision. * exceptions.cc (try_to_debug): Notify debugger if already being debugged. --- winsup/cygwin/fork.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index e3b606607..649baa3e3 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -414,7 +414,7 @@ fork_parent (HANDLE&, dll *&first_dll, bool& load_dlls, void *stack_here, child_ #endif /* Wait for subproc to initialize itself. */ - if (!ch.sync (child, FORK_WAIT_TIMEOUT)) + if (!ch.sync (child->pid, pi.hProcess, FORK_WAIT_TIMEOUT)) { system_printf ("child %d died waiting for longjmp before initialization", child_pid); goto cleanup; @@ -465,7 +465,7 @@ fork_parent (HANDLE&, dll *&first_dll, bool& load_dlls, void *stack_here, child_ /* Start thread, and wait for it to reload dlls. */ if (!resume_child (forker_finished)) goto cleanup; - else if (!ch.sync (child, FORK_WAIT_TIMEOUT)) + else if (!ch.sync (child->pid, pi.hProcess, FORK_WAIT_TIMEOUT)) { system_printf ("child %d died waiting for dll loading", child_pid); goto cleanup; -- cgit v1.2.3