* cygthread.h (cygthread::name): Default name to "main" if we are early in the
process of setting up the DLL and no name is known. * dcrt0.cc (initial_env): Remove CYGWIN_SLEEP stuff. (get_cygwin_startup_info): Activate strace here as appropriate. (dll_crt0_0): Move get_cygwin_startup_info as early as possible to avoid missing strace output. * fork.cc (frok::child): Move debugging statement to point where ppid will be set. * pinfo.cc (pinfo::thisproc): Remove obsolete call to strace.hello. Tweak debug output slightly. * select.cc (select_stuff::wait): Allow APCS to be triggered while waiting since we use them now. Report when that happens. * sigproc.cc (child_info::child_info): Use strace.active() rather than strace.attached(). * spawn.cc (child_info_spawn::worker): Only write strace child pid when we know it's a cygwin process. Accommodate change to write_child argument list. * strace.cc (strace::hello): Delete. Move functionality... (strace::activate): ...to here. (mypid): Just use raw GetCurrentProcessId () if myself isn't set. (strace::write_childpid): Don't wait for subproc_ready. Remove arg which was required for it. * include/sys/strace.h (strace::hello): Delete. (strace::write_childpid): Delete first argument.
This commit is contained in:
@ -193,8 +193,6 @@ frok::child (volatile char * volatile here)
|
||||
extern void fixup_lockf_after_fork ();
|
||||
extern void fixup_hooks_after_fork ();
|
||||
extern void fixup_timers_after_fork ();
|
||||
debug_printf ("child is running. pid %d, ppid %d, stack here %p",
|
||||
myself->pid, myself->ppid, __builtin_frame_address (0));
|
||||
|
||||
/* NOTE: Logically this belongs in dll_list::load_after_fork, but by
|
||||
doing it here, before the first sync_with_parent, we can exploit
|
||||
@ -203,6 +201,8 @@ frok::child (volatile char * volatile here)
|
||||
dlls.reserve_space ();
|
||||
|
||||
sync_with_parent ("after longjmp", true);
|
||||
debug_printf ("child is running. pid %d, ppid %d, stack here %p",
|
||||
myself->pid, myself->ppid, __builtin_frame_address (0));
|
||||
sigproc_printf ("hParent %p, load_dlls %d", hParent, load_dlls);
|
||||
|
||||
/* If we've played with the stack, stacksize != 0. That means that
|
||||
@ -442,7 +442,7 @@ frok::parent (volatile char * volatile stack_here)
|
||||
be called in subproc handling. */
|
||||
ProtectHandle1 (hchild, childhProc);
|
||||
|
||||
strace.write_childpid (ch, pi.dwProcessId);
|
||||
strace.write_childpid (pi.dwProcessId);
|
||||
|
||||
/* Wait for subproc to initialize itself. */
|
||||
if (!ch.sync (pi.dwProcessId, hchild, FORK_WAIT_TIMEOUT))
|
||||
@ -503,6 +503,7 @@ frok::parent (volatile char * volatile stack_here)
|
||||
/* CHILD IS STOPPED */
|
||||
debug_printf ("child is alive (but stopped)");
|
||||
|
||||
|
||||
/* Initialize, in order: stack, dll data, dll bss.
|
||||
data, bss, heap were done earlier (in dcrt0.cc)
|
||||
Note: variables marked as NO_COPY will not be copied since they are
|
||||
|
Reference in New Issue
Block a user