[Bug 199557] Hang on sysconf(_SC_OPEN_MAX)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Apr 23 21:32:45 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199557
Jilles Tjoelker <jilles at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jilles at FreeBSD.org
--- Comment #7 from Jilles Tjoelker <jilles at FreeBSD.org> ---
There is a proposal for an async-signal safe version of fork() called _Fork(),
which does not call atfork handlers, at
http://austingroupbugs.net/view.php?id=62 . This would help if the only problem
with calling fork() is that it executes atfork handlers. It still executes a
fair bit of code, but no user code.
To make _Fork() async-signal safe, the malloc handling would have to be
disabled as well, making malloc/free in the child more unsafe (but also
interfering less with other threads in the parent). The handling of the lock
for sem_open() and sem_close() uses pthread_atfork() and would be disabled as
well.
This may be useful for this and other situations that want to fork from signal
handlers or other strange thread states.
I have not found common implementations of _Fork(), though.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list