Clarify RETURN VALUE discussion.

This commit is contained in:
Michael Kerrisk 2006-04-30 22:10:38 +00:00
parent dbd411a49c
commit 13218d42ae
1 changed files with 7 additions and 5 deletions

View File

@ -79,13 +79,15 @@ and
has the advantage of not affecting any signals, it is standardized by
POSIX, it provides higher timing resolution, and it allows to continue
a sleep that has been interrupted by a signal more easily.
.SH ERRORS
In case of an error or exception, the
.SH "RETURN VALUE"
On successfully sleeping for the requested interval,
.BR nanosleep ()
system call returns \-1 instead of 0 and sets
returns 0.
If the call is interrupted by a signal handler or encounters an error,
then it returns \-1, with
.I errno
to one of the following values:
.TP
set to indicate the error.
.SH ERRORS
.B EFAULT
Problem with copying information from user space.
.TP