[Gc] Re: Problem pthread_atfork
Andy Wingo
wingo at pobox.com
Mon Mar 26 08:55:43 PST 2012
On Mon 26 Mar 2012 14:59, Ivan Maidanski <ivmai at mail.ru> writes:
> 1. provide configure --enable/disable-handle-fork trigging [NO_]HANDLE_FORK
Sure, will do.
> 2. if no such option given, test atfork availability (by linking a code snippet with pthread_atfork).
Is this possible? Surely Manuel succeeded in compiling libgc and its
tests, and the problem only occured when he went to link libgc to a
program of his that does -lpthread.
If I may suggest, perhaps the right thing to do is not enable this code
by default, as it makes otherwise correct programs incorrect. That is,
for a program that only calls signal-safe primitives after a
multithreaded fork, this patch makes such a program depend on
unspecified behavior of their OS.
Andy
--
http://wingolog.org/
More information about the Gc
mailing list