https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199557

Jilles Tjoelker <jil...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jil...@freebsd.org

--- Comment #7 from Jilles Tjoelker <jil...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to