* Makefile.in (DLL_OFILES): Add hookapi.o. Eliminate some cruft.
* cygheap.h (cygheap_types): Add new enum: HEAP_1_HOOK. (hook_chain): New struct. (init_cygheap::hooks): Define new element. * cygheap.cc (cygheap_fixup_in_child): Zero hook chain on exec. * dcrt0.cc (dll_crt0_1): Call ld_preload just before calling main function. * external.cc (cygwin_internal): Implement CW_HOOK. * fork.cc (fork_child): Call fixup_hooks_after_fork. * init.cc (cygwin_hmodule): Reinstate after a long absence. * include/sys/cygwin.h: Define CW_HOOK. * hookapi.cc: New file. * select.cc (start_thread_socket): Add debugging output. * fhandler_disk_file.cc (fhandler_disk_file::fchmod): gcc 4.x accommodation. * fhandler_socket.cc (fhandler_socket::connect): Make sure that err is initialized.
This commit is contained in:
@@ -154,6 +154,7 @@ sync_with_parent (const char *s, bool hang_self)
|
||||
static int __stdcall
|
||||
fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||
{
|
||||
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));
|
||||
@@ -232,6 +233,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||
|
||||
pthread::atforkchild ();
|
||||
fixup_timers_after_fork ();
|
||||
fixup_hooks_after_fork ();
|
||||
cygbench ("fork-child");
|
||||
cygwin_finished_initializing = true;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user