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