This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: setcontext in a signal handler
- From: Andreas Schwab <schwab at suse dot de>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: Michael Kerrisk-manpages <mtk dot manpages at gmail dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 04 Mar 2014 09:23:29 +0100
- Subject: Re: setcontext in a signal handler
- Authentication-results: sourceware.org; auth=none
- References: <CANu=DmjHdiCf-jEMS6vAb9MgwG-XzYGOfMBHJr7LDvTgNRTnDg at mail dot gmail dot com>
Will Newton <will.newton@linaro.org> writes:
> It's not clear to me that there is any standard that mandates that
> setcontext cannot be called from a signal handler or whether it is an
> implementation detail of glibc. Does anybody know of any historical
> reasons for this being the case?
No function is async-signal-safe unless explicitly described as such.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."