OSDN Git Service

9275b91a67724e9d8dfa9e071583359ab65777dd
[linuxjm/LDP_man-pages.git] / release / man2 / alarm.2
1 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
2 .\"             and Copyright (C) 1993 Michael Haardt, Ian Jackson.
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified Wed Jul 21 19:42:57 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer <aeb@cwi.nl>
28 .\" Modified Wed Nov  6 03:46:05 1996 by Eric S. Raymond <esr@thyrsus.com>
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH ALARM 2 2013\-04\-18 Linux "Linux Programmer's Manual"
36 .SH 名前
37 alarm \- シグナル配送のためのアラーム・クロックを設定する
38 .SH 書式
39 .nf
40 \fB#include <unistd.h>\fP
41 .sp
42 \fBunsigned int alarm(unsigned int \fP\fIseconds\fP\fB);\fP
43 .fi
44 .SH 説明
45 \fBalarm\fP()  は \fBSIGALRM\fP シグナルを \fIseconds\fP 秒後に呼び出したプロセスに配送するように手配する。
46
47 \fIseconds\fP がゼロならば、処理待ち (pending) のアラームはすべてキャンセルされる。
48
49 今までに設定されていた \fBalarm\fP()  は中断される。
50 .SH 返り値
51 \fBalarm\fP()  は以前に予定されていたアラームの配送までの残り時間を返す。以前に アラームが予定されていなければゼロを返す。
52 .SH 準拠
53 SVr4, POSIX.1\-2001, 4.3BSD.
54 .SH 注意
55 \fBalarm\fP()  と \fBsetitimer\fP(2)  は同じタイマーを共有している; 片方を呼び出すことはもう一方の 使用に影響を与える。
56 .PP
57 \fBsleep\fP(3)  は \fBSIGALRM\fP を利用して実装されているかもしれない。 \fBalarm\fP()  と \fBsleep\fP(3)
58 を混ぜて使用してはならない。
59
60 スケジューリング(scheduling)の遅延により、プロセスの実行に不定量の 遅延が起きる可能性がある。
61 .SH 関連項目
62 \fBgettimeofday\fP(2), \fBpause\fP(2), \fBselect\fP(2), \fBsetitimer\fP(2),
63 \fBsigaction\fP(2), \fBsignal\fP(2), \fBsleep\fP(3), \fBtime\fP(7)
64 .SH この文書について
65 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
66 である。プロジェクトの説明とバグ報告に関する情報は
67 http://www.kernel.org/doc/man\-pages/ に書かれている。