OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
26 .\"       all rights reserved.
27 .\" Translated Tue Jan 21 20:46:24 JST 1997
28 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
29 .\"
30 .\" WORD:       signal handler  シグナルハンドラー
31 .\"
32 .TH SLEEP 3  2010-02-03 "GNU" "Linux Programmer's Manual"
33 .SH 名前
34 sleep \- 指定の秒数の間だけ休止する
35 .SH 書式
36 .nf
37 .B #include <unistd.h>
38 .sp
39 .BI "unsigned int sleep(unsigned int " "seconds" );
40 .fi
41 .SH 説明
42 .BR sleep ()
43 は、呼び出したスレッドを
44 .I seconds
45 秒間または無視されないシグナルが到着するまで休止する。
46 .SH 返り値
47 要求された時間が過ぎた場合はゼロを返す。
48 呼び出しがシグナルハンドラーに割り込まれた場合は、
49 休止の残り時間を返す。
50 .SH 準拠
51 POSIX.1-2001.
52 .SH バグ
53 .BR sleep ()
54
55 .B SIGALRM
56 を用いて実装されている。そのため、
57 .BR alarm (2)
58
59 .BR sleep ()
60 を混ぜて使用するのは、まずい考えである。
61 .PP
62 休止中にシグナルハンドラーから
63 .BR longjmp (3)
64 を使用することや
65 .B SIGALRM
66 のハンドリングを変更することは、定義されていない結果を生む。
67 .SH 関連項目
68 .BR alarm (2),
69 .BR nanosleep (2),
70 .BR signal (2),
71 .BR signal (7)