This is the mail archive of the
mailing list for the glibc project.
Re: static fork strerror and how they interact.
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: libc-help at sourceware dot org
- Date: Mon, 16 Mar 2015 21:58:04 +0100
- Subject: Re: static fork strerror and how they interact.
- Authentication-results: sourceware.org; auth=none
- References: <fad997db4179 dot 545133ef at langara dot bc dot ca> <545146E9 dot 8040208 at redhat dot com> <87d2488y1k dot fsf at mid dot deneb dot enyo dot de>
* Florian Weimer:
> * Carlos O'Donell:
>> On 10/29/2014 02:37 PM, Steven Stewart-Gallus wrote:
>>> You have to use strerror_r. If you fork from a mullithreaded process you can't
>>> allocate memory safely though. An ugly hack to solve the problem is to spawn a
>> You must not call async-signal-unsafe functions, and malloc
>> et. al. are async-signal unsafe. Therefore you can't allocate
>> memory, you must use a static buffer.
> We have to support malloc-after-fork as an extension, at the very
> least if the original program was not multi-threaded. Too many
> programs rely on that.
Sorry, for some reason, I picked a really old message to reply tp. :-/