Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 2015 21:32:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 199557] Hang on sysconf(_SC_OPEN_MAX)
Message-ID:  <bug-199557-8-rPnfB2acZO@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-199557-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-199557-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199557

Jilles Tjoelker <jilles@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jilles@FreeBSD.org

--- Comment #7 from Jilles Tjoelker <jilles@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199557-8-rPnfB2acZO>