Bug 145337 - nanosleep from 32 bit process return EINVAL instead of EINTR
Summary: nanosleep from 32 bit process return EINVAL instead of EINTR
Status: CLOSED DUPLICATE of bug 145338
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: compat-glibc
Version: 4.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-17 16:25 UTC by john yates
Modified: 2007-11-30 22:07 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2005-01-17 16:56:09 UTC


Attachments (Terms of Use)

Description john yates 2005-01-17 16:25:46 UTC
Description of problem:

(Component is just a guess)

Executing nanosleep from a 32-bit returns wrong value in errno when interrupted 
by a signal (EINVAL instead of EINTR).  For quick reference here is man page 
description:

====

In case of an error or exception, the nanosleep system call returns -1 instead 
of 0 and sets errno to one of the following values:

EINTR 
The pause has been interrupted by a non-blocked signal that was delivered to 
the process. The remaining sleep time has been written into *rem so that the 
process can easily call nanosleep again and continue with the pause. 

EINVAL 
The value in the tv_nsec field was not in the range 0 to 999 999 999 or tv_sec 
was negative. 
  

Version-Release number of selected component (if applicable):


How reproducible:

Run repro.sh from attached archive.

Actual results:

errno is EINVAL

Expected results:

errno should be EINTR

Additional info:

Comment 1 john yates 2005-01-17 16:29:51 UTC
Mea culpa!  This was my first attempt to submit a bug.  The attachment was 
missing.  I now understand that I could add it later.  145338 is the same bug 
with the repro file attached.

Comment 2 Jakub Jelinek 2005-01-17 16:56:09 UTC

*** This bug has been marked as a duplicate of 145338 ***


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