This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: signals and _REENT
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: newlib at sourceware dot org
- Date: Tue, 24 Feb 2015 13:07:31 -0500 (EST)
- Subject: Re: signals and _REENT
- Authentication-results: sourceware.org; auth=none
- References: <54E8FC58 dot 1060503 at op dot pl> <20150224133049 dot GH437 at calimero dot vinschen dot de>
These functions set errno for the caller when an error has occurred.
This would mean a user would have to check the global errno value (not using
the dynamic reentrancy errno macro) which in turn could be changed by
another thread making similar calls and therefore unreliable.
----- Original Message -----
From: "Corinna Vinschen" <vinschen@redhat.com>
To: newlib@sourceware.org
Sent: Tuesday, February 24, 2015 8:30:49 AM
Subject: Re: signals and _REENT
On Feb 21 22:44, Freddie Chopin wrote:
> Hello!
>
> While browsing newlib's source I noticed that signal-related functions in
> newlib (like signal() or raise()) use _REENT, which is per-thread. Shouldn't
> these functions use _GLOBAL_REENT, which I assume is per-process?
Hmm. Hard to tell. I'm not sure about the original intention of
this code. I *think* you're right, though. Jeff?
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat