This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Deadlock in multithreaded application when doing IO andfork.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 1 Feb 2013 13:01:38 -0800 (PST)
- Subject: Re: RFC: Deadlock in multithreaded application when doing IO andfork.
- References: <510AF80E.5020400@redhat.com><20130201205320.GT20323@brightrain.aerifal.cx>
> But not safe to use async-signal-unsafe functions in the child after
> fork. In particular, malloc is not legal after fork in a
> multi-threaded program, so the simplest solution would be to remove
> all the atfork handling for malloc.
The issues at hand are in the atfork handlers that run in the parent.
There are no restrictions on what calls those can make.