diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2 index c560582c4026..fe39fd74fdef 100644 --- a/lib/libc/sys/nanosleep.2 +++ b/lib/libc/sys/nanosleep.2 @@ -40,6 +40,7 @@ .Os .Sh NAME .Nm nanosleep +.Nd suspend process execution for an interval measured in nanoseconds .Sh SYNOPSIS .Fd #include .Ft int @@ -50,7 +51,7 @@ causes the process to sleep for the specified time. An unmasked signal will cause it to terminate the sleep early, regardless of the .Dv SA_RESTART value on the interrupting signal. -.Sh RETURN VALUE +.Sh RETURN VALUES If the .Fn nanosleep function returns because the requested time has elapsed, the value @@ -68,12 +69,12 @@ is .Pf non- Dv NULL , the timespec structure it references is updated to contain the unslept amount (the request time minus the time actually slept). -.Sh ERRORS +.Pp If any of the following conditions occur, the -.Nm +.Fn nanosleep function shall return -1 and set .Va errno -to the corresponding value. +to the corresponding value: .Bl -tag -width Er .It Bq Er EFAULT Either @@ -83,14 +84,14 @@ or points to memory that is not a valid part of the process address space. .It Bq Er EINTR -.Nm +.Fn nanosleep was interrupted by the delivery of a signal. .It Bq Er EINVAL .Fa rqtp specified a nanosecond value less than zero or greater than or equal to 1000 million. .It Bq Er ENOSYS -.Nm +.Fn nanosleep is not supported by this implementation. .El .Sh SEE ALSO