This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: determine whether code is running in a signal handler context


On Wed, Oct 18, 2017 at 11:51 PM, Yubin Ruan <ablacktshirt@gmail.com> wrote:
> 2017-10-19 11:12 GMT+08:00 Sean Conner <sean@conman.org>:
>> ...
>>   Wouldn't it be easier (and safer) just to document the library as
>> not-async-signal-safe ("These functions, called from a signal handler, will
>> invoke undefined behavior")?  Use a large font if you have to, but I think
>> protecting programmers from themselves over the long term is bad.
>
> Yes I can document that and that is indeed an option. But I don't know
> whether the user will read the docs. ;-)
>
> It would be great if we can handle that smoothly such that users will
> not notice.

If RTFM was going to work, then it would have happened in the last 50
years or so.

You're applying solid engineering techniques. I encourage you to stay
the course.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]