OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / sleep.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu)
24 .\"*******************************************************************
25 .\"
26 .\" This file was generated with po4a. Translate the source file.
27 .\"
28 .\"*******************************************************************
29 .TH SLEEP 3 2010\-02\-03 GNU "Linux Programmer's Manual"
30 .SH 名前
31 sleep \- 指定の秒数の間だけ休止する
32 .SH 書式
33 .nf
34 \fB#include <unistd.h>\fP
35 .sp
36 \fBunsigned int sleep(unsigned int \fP\fIseconds\fP\fB);\fP
37 .fi
38 .SH 説明
39 \fBsleep\fP()  は、呼び出したスレッドを \fIseconds\fP 秒間または無視されないシグナルが到着するまで休止する。
40 .SH 返り値
41 要求された時間が過ぎた場合はゼロを返す。 呼び出しがシグナルハンドラーに割り込まれた場合は、 休止の残り時間を返す。
42 .SH 準拠
43 POSIX.1\-2001.
44 .SH バグ
45 \fBsleep\fP()  は \fBSIGALRM\fP を用いて実装されている。そのため、 \fBalarm\fP(2)  と \fBsleep\fP()
46 を混ぜて使用するのは、まずい考えである。
47 .PP
48 休止中にシグナルハンドラーから \fBlongjmp\fP(3)  を使用することや \fBSIGALRM\fP
49 のハンドリングを変更することは、定義されていない結果を生む。
50 .SH 関連項目
51 \fBalarm\fP(2), \fBnanosleep\fP(2), \fBsignal\fP(2), \fBsignal\fP(7)