]> granicus.if.org Git - gc/commit
Fix Cygwin support to handle fork() properly
authorIvan Maidanski <ivmai@mail.ru>
Fri, 24 Feb 2012 10:34:34 +0000 (14:34 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 24 Feb 2012 11:52:36 +0000 (15:52 +0400)
commitfdb3880ec542e6d7498925e14702fb36306f816c
tree028077533e3efa299769cffb800884c0eb79cfa0
parentf5af75622d75534e34d2739d3f638c429e993691
Fix Cygwin support to handle fork() properly
(Apply commit 11e95a1 from 'master' branch)

* include/private/gcconfig.h (HANDLE_FORK): Define also for Cygwin
(but not for win32-pthreads).
* win32_threads.c: Include unistd.h if HANDLE_FORK (for
pthread_atfork).
* win32_threads.c (GC_wait_for_gc_completion): Add wait_for_all
argument.
* win32_threads.c (GC_unregister_my_thread, GC_thread_exit_proc): Pass
FALSE ("wait_for_all" argument) to GC_wait_for_gc_completion.
* win32_threads.c (GC_remove_all_threads_but_me, GC_fork_prepare_proc,
GC_fork_parent_proc, GC_fork_child_proc): New functions (similar to
that in pthread_support.c) if HANDLE_FORK.
* win32_threads.c (GC_thr_init): Invoke pthread_atfork if HANDLE_FORK.
include/private/gcconfig.h
win32_threads.c