Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/sys Add a proper DESCRIPTION to the man page, per P...



details:   https://anonhg.NetBSD.org/src/rev/1f11160acd2e
branches:  trunk
changeset: 494496:1f11160acd2e
user:      fair <fair%NetBSD.org@localhost>
date:      Fri Jul 07 05:18:49 2000 +0000

description:
Add a proper DESCRIPTION to the man page, per PR 10072.

diffstat:

 lib/libc/sys/nanosleep.2 |  30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diffs (73 lines):

diff -r ed32d5c4275e -r 1f11160acd2e lib/libc/sys/nanosleep.2
--- a/lib/libc/sys/nanosleep.2  Fri Jul 07 04:35:35 2000 +0000
+++ b/lib/libc/sys/nanosleep.2  Fri Jul 07 05:18:49 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: nanosleep.2,v 1.2 1999/12/02 21:42:38 kleink Exp $
+.\"    $NetBSD: nanosleep.2,v 1.3 2000/07/07 05:18:49 fair Exp $
 .\"
 .\" Copyright (c) 1986, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -35,7 +35,7 @@
 .\"
 .Dd April 17, 1997
 .Dt NANOSLEEP 2
-.Os 
+.Os
 .Sh NAME
 .Nm nanosleep
 .Sh LIBRARY
@@ -44,28 +44,38 @@
 .Fd #include <time.h>
 .Ft int
 .Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp"
-.\" .Sh DESCRIPTION
+.Sh DESCRIPTION
+The
+.Fn nanosleep
+suspends execution of the calling process until either the number of
+seconds and nanoseconds specified by
+.Fa rqtp
+have elapsed or a signal is delivered to the calling process and its
+action is to invoke a signal catching function or to terminate the
+process.
+The suspension time may be longer than requested due to the
+scheduling of other activity by the system.
 .Sh RETURN VALUE
-If the 
+If the
 .Fn nanosleep
 function returns because the requested time has elapsed, the value
-returned will be zero.  
+returned will be zero.
 .Pp
-If the 
+If the
 .Fn nanosleep
 function returns due to the delivery of a signal, the value returned
 will be the -1, and the global variable
 .Va errno
 will be set to indicate the interruption.
-If 
+If
 .Fa rmtp
-is 
+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
 If any of the following conditions occur, the
-.Nm 
+.Nm
 function shall return -1 and set
 .Va errno
 to the corresponding value.
@@ -73,7 +83,7 @@
 .It Bq Er EFAULT
 Either
 .Fa rqtp
-or 
+or
 .Fa rmtp
 points to memory that is not a valid part of the process
 address space.



Home | Main Index | Thread Index | Old Index