OSDN Git Service

c8faaa383d17109169f241962bf70dbd9d6e9408
[linuxjm/LDP_man-pages.git] / draft / man2 / alarm.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\"                               1993 Michael Haardt, Ian Jackson.
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Modified Wed Jul 21 19:42:57 1993, Rik Faith <faith@cs.unc.edu>
27 .\" Modified Sun Jul 21 21:25:26 1996, Andries Brouwer <aeb@cwi.nl>
28 .\" Modified Wed Nov  6 03:46:05 1996 by Eric S. Raymond <esr@thyrsus.com>
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
31 .\"         all rights reserved.
32 .\" Translated Wed Feb 22 20:02:18 JST 1997
33 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
34 .\"
35 .\"WORD:        alarm                   アラーム
36 .\"WORD:        signal                  シグナル
37 .\"WORD:        clock                   クロック
38 .\"WORD:        process                 プロセス
39 .\"WORD:        timer                   タイマー
40 .\"WORD:        scheduling              スケジューリング
41 .\"
42 .TH ALARM 2 2008-06-12 "Linux" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .SH 名前
45 .\"O alarm \- set an alarm clock for delivery of a signal
46 alarm \- シグナル配送のためのアラーム・クロックを設定する
47 .\"O .SH SYNOPSIS
48 .SH 書式
49 .nf
50 .B #include <unistd.h>
51 .sp
52 .BI "unsigned int alarm(unsigned int " seconds );
53 .fi
54 .\"O .SH DESCRIPTION
55 .SH 説明
56 .\"O .BR alarm ()
57 .\"O arranges for a
58 .\"O .B SIGALRM
59 .\"O signal to be delivered to the calling process in
60 .\"O .I seconds
61 .\"O seconds.
62 .BR alarm ()
63
64 .B SIGALRM
65 シグナルを
66 .I seconds
67 秒後に呼び出したプロセスに配送するように手配する。
68
69 .\"O If
70 .\"O .I seconds
71 .\"O is zero, no new
72 .\"O .BR alarm ()
73 .\"O is scheduled.
74 .I seconds
75 がゼロならば、新たな
76 .BR alarm ()
77 は手配されない。
78
79 .\"O In any event any previously set
80 .\"O .BR alarm ()
81 .\"O is canceled.
82 今までに設定されていた
83 .BR alarm ()
84 は中断される。
85 .\"O .SH "RETURN VALUE"
86 .SH 返り値
87 .\"O .BR alarm ()
88 .\"O returns the number of seconds remaining until any previously scheduled
89 .\"O alarm was due to be delivered, or zero if there was no previously
90 .\"O scheduled alarm.
91 .BR alarm ()
92 は以前に予定されていたアラームの配送までの残り時間を返す。以前に
93 アラームが予定されていなければゼロを返す。
94 .\"O .SH "CONFORMING TO"
95 .SH 準拠
96 SVr4, POSIX.1-2001, 4.3BSD.
97 .\"O .SH NOTES
98 .SH 注意
99 .\"O .BR alarm ()
100 .\"O and
101 .\"O .BR setitimer (2)
102 .\"O share the same timer; calls to one will interfere with use of the
103 .\"O other.
104 .BR alarm ()
105
106 .BR setitimer (2)
107 は同じタイマーを共有している; 片方を呼び出すことはもう一方の
108 使用に影響を与える。
109 .PP
110 .\"O .BR sleep (3)
111 .\"O may be implemented using
112 .\"O .BR SIGALRM ;
113 .\"O mixing calls to
114 .\"O .BR alarm ()
115 .\"O and
116 .\"O .BR sleep (3)
117 .\"O is a bad idea.
118 .BR sleep (3)
119
120 .B SIGALRM
121 を利用して実装されているかもしれない。
122 .BR alarm ()
123
124 .BR sleep (3)
125 を混ぜて使用してはならない。
126
127 .\"O Scheduling delays can, as ever, cause the execution of the process to
128 .\"O be delayed by an arbitrary amount of time.
129 スケジューリング(scheduling)の遅延により、プロセスの実行に不定量の
130 遅延が起きる可能性がある。
131 .\"O .SH "SEE ALSO"
132 .SH 関連項目
133 .BR gettimeofday (2),
134 .BR pause (2),
135 .BR select (2),
136 .BR setitimer (2),
137 .BR sigaction (2),
138 .BR signal (2),
139 .BR sleep (3),
140 .BR time (7)