signals and _REENT

Jeff Johnston jjohnstn@redhat.com
Thu Feb 26 21:04:00 GMT 2015


Here is patch as mentioned.  Did I miss anything?

-- Jeff J.

----- Original Message -----
From: "Jeff Johnston" <jjohnstn@redhat.com>
To: "Freddie Chopin" <freddie_chopin@op.pl>
Cc: newlib@sourceware.org
Sent: Wednesday, February 25, 2015 12:34:13 PM
Subject: Re: signals and _REENT

Agreed.  I will post a patch.

----- Original Message -----
From: "Freddie Chopin" <freddie_chopin@op.pl>
To: newlib@sourceware.org
Sent: Tuesday, February 24, 2015 4:06:58 PM
Subject: Re: signals and _REENT

On 02/24/2015 07:07 PM, Jeff Johnston wrote:
> 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.

If errno is the only reason for using _REENT instead of _GLOBAL_REENT 
then this can be easily solved. The functions may still get pointer to 
current _REENT (for errno), but signal actions should be taken/set with 
_GLOBAL_REENT.

Regards,
FCh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signal.patch
Type: text/x-patch
Size: 2368 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20150226/94866a92/attachment.bin>


More information about the Newlib mailing list