aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/sleep.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-04-26 15:06:49 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-02 01:24:19 +0200
commitdcde2f70372b49ec43efc5db864c9ff585d0a2dd (patch)
tree78b9b7425130e4a5858e4c01a524d802423879ed /man/man3/sleep.3
parent12aca537ce78a41bbcdaf485209691e10f8002d7 (diff)
downloadman-pages-dcde2f70372b49ec43efc5db864c9ff585d0a2dd.tar.gz
man/, share/mk/: Move man*/ to man/
This is a scripted change: $ mkdir man/; $ mv man* man/; $ ln -st . man/man*; $ find share/mk/ -type f \ | xargs grep -l '^MANDIR *:=' \ | xargs sed -i '/^MANDIR *:=/s,$,/man,'; $ find share/mk/dist/ -type f \ | xargs grep -l man \ | xargs sed -i 's,man%,man/%,g'; Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/> Cc: Petr Vorel <pvorel@suse.cz> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/sleep.3')
-rw-r--r--man/man3/sleep.379
1 files changed, 79 insertions, 0 deletions
diff --git a/man/man3/sleep.3 b/man/man3/sleep.3
new file mode 100644
index 0000000000..0cf235d90a
--- /dev/null
+++ b/man/man3/sleep.3
@@ -0,0 +1,79 @@
+'\" t
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu)
+.TH sleep 3 (date) "Linux man-pages (unreleased)"
+.SH NAME
+sleep \- sleep for a specified number of seconds
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <unistd.h>
+.P
+.BI "unsigned int sleep(unsigned int " "seconds" );
+.fi
+.SH DESCRIPTION
+.BR sleep ()
+causes the calling thread to sleep either until
+the number of real-time seconds specified in
+.I seconds
+have elapsed or until a signal arrives which is not ignored.
+.SH RETURN VALUE
+Zero if the requested time has elapsed,
+or the number of seconds left to sleep,
+if the call was interrupted by a signal handler.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR sleep ()
+T} Thread safety MT-Unsafe sig:SIGCHLD/linux
+.TE
+.SH VERSIONS
+On Linux,
+.BR sleep ()
+is implemented via
+.BR nanosleep (2).
+See the
+.BR nanosleep (2)
+man page for a discussion of the clock used.
+.P
+On some systems,
+.BR sleep ()
+may be implemented using
+.BR alarm (2)
+and
+.B SIGALRM
+(POSIX.1 permits this);
+mixing calls to
+.BR alarm (2)
+and
+.BR sleep ()
+is a bad idea.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH CAVEATS
+Using
+.BR longjmp (3)
+from a signal handler or modifying the handling of
+.B SIGALRM
+while sleeping will cause undefined results.
+.SH SEE ALSO
+.BR sleep (1),
+.BR alarm (2),
+.BR nanosleep (2),
+.BR signal (2),
+.BR signal (7)