bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nanosleep modifying second parameter on success


From: Samuel Thibault
Subject: Re: nanosleep modifying second parameter on success
Date: Fri, 5 Aug 2011 16:19:15 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Simon Josefsson, le Thu 04 Aug 2011 12:10:43 +0200, a écrit :
> it seems the nanosleep function modifies the second parameter on
> success.
> 
> This behaviour doesn't seem consistent with the specification at
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html
> 
> It seems the second parameter should not be modified unless the call
> fails with EINTR, right?

Indeed. Actually glibc/sysdeps/mach/nanosleep never returns EINTR, it
just ignores the value returned by __mach_msg. I guess it should check
for MACH_RCV_INTERRUPTED. Could you work on a patch?

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]