bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is malloc signal-"tolerant"?


From: Roland McGrath
Subject: Re: Is malloc signal-"tolerant"?
Date: Sat, 22 Dec 2001 18:59:33 -0500 (EST)

> it is a well-documented fact that malloc is not a signal-safe function -
> i.e. it cannot be called from the context of a signal handler.
> 
> But is malloc signal-"tolerant" in that its internal data structures
> survive a longjmp() (or a siglongjmp()) out of a signal handler?

These two are the same requirement.  In short, the answer is "no".  If you
think about what signal safety really means, you will see that any function
that would survive a longjmp out of a signal handler from inside that
function (if "survive" means its data structures remain intact for later
use) would in fact also be reentrant, by definition.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]