Skip to contentSkip to conversation

incorrect clock_nanosleep.2

DISCUSSION Yuri Kozlov 2 participants 2 messages Aug 12, 2010 – Aug 29, 2010 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hello.

Next two paragraph is contradict.

If the call is interrupted by a signal handler, clock_nanosleep() returns -1, and sets errno to EINTR.

And below:
RETURN VALUE
On successfully sleeping for the requested interval, clock_nanosleep() returns 0. If the call is interrupted by a signal handler or encounters an error, then it returns a positive error number.

So, return value is positive or -1 ?

Signature · 7 lines
Best Regards,
Yuri Kozlov

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive

Hello Yuri,

Quoted 7 lines · Yuri Kozlov

Hello.

Next two paragraph is contradict.

If the call is interrupted by a signal handler, clock_nanosleep() returns -1, and sets errno to EINTR.

Quoted 8 lines

And below:
RETURN VALUE
      On successfully sleeping for the requested interval, clock_nanosleep() returns 0.  If the call is interrupted by a signal handler or encounters an error, then it returns a positive error number.

So, return value is positive or -1 ?

Thanks. This was in fact independently reported a few weeks ago, and this fix was applied:

man2/clock_nanosleep.2 +1 -3
@@ -124,9 +124,7 @@ that terminates the process.
 
 If the call is interrupted by a signal handler,
 .BR clock_nanosleep ()
-returns \-1, and sets
-.I errno
-to
+fails with the error
 .BR EINTR .
 In addition, if
 .I remain

Cheers,

Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html