Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 159085 - errno is 0 when sigwait returns an error
errno is 0 when sigwait returns an error
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-05-29 01:42 EDT by Jonathan Kamens
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-30 04:43:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2005-05-29 01:42:33 EDT
For some reason I do not understand from looking at the code, which must be
related in some weird way to how glibc handles function calls, system calls,
etc., when sigwait returns an error code the value of errno is not preserved,
i.e., the errno value is returned as an error code from sigwait but errno is 0
when it's examined.  The value of errno should be preserved, as it is on
non-Linux operating systems.
Comment 1 Jakub Jelinek 2005-05-30 04:43:37 EDT
errno after sigwait is unspecified.
As sigwait's description doesn't mandate anything about errno value, it is
unspecified.  The only requirement is that if errno was non-zero before sigwait,
it will not be set to 0 by the call.  If you see errno becoming 0 when it
previously was non-zero, then please provide a testcase.
But to my knowledge nothing in glibc violates that requirement, especially not
sigwait, which on most architectures will simply not touch errno at all, only
return the error value as it is supposed to do.

Note You need to log in before you can comment on or make changes to this bug.