pthreads, fork+exec, and deadlocks
Aidan Van Dyk
aidan@highrise.ca
Wed Sep 10 20:21:00 GMT 2003
* Ulrich Drepper <drepper@redhat.com> [030910 16:07]:
> Aidan Van Dyk wrote:
>
> > Digging finds mention of "async-signal-safe functions" in the POSIX docs
> > on opengroup.org.
> >
> > Is there a list of these functions for POSIX/glibc anywhere?
>
> There are no functions beside those required by the standard.
From: IEEE Std 1003.1, 2003 Edition
A process shall be created with a single thread. If a
multi-threaded process calls fork(), the new process shall
contain a replica of the calling thread and its entire address
space, possibly including the states of mutexes and other
resources. Consequently, to avoid errors, the child process may
only execute async-signal-safe operations until such time as one
of the exec functions is called. [THR] Fork handlers may be
established by means of the pthread_atfork() function in order
to maintain application invariants across fork() calls.
I'm trying to find out what these "async-signal-safe" functions are.
I can't find any mention of this stuff in any of the manpages I have in
RH 8, or on othe opengroup's site...
Can I find these standards anywhere?
Thanks,
a.
--
Aidan Van Dyk Create like a god,
aidan@highrise.ca command like a king,
http://www.highrise.ca/ work like a slave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030910/513e7be1/attachment.sig>
More information about the Libc-alpha
mailing list