OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man3 / ualarm.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21 .\" USA.
22 .\"
23 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
24 .\"         all rights reserved.
25 .\" Translated Sat Sep 11 07:32:05 JST 2004
26 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
27 .\" Updated 2007-05-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"
29 .TH UALARM 3  2008-08-06 "" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O ualarm \- schedule signal after given number of microseconds
33 ualarm \- »ØÄꤷ¤¿¥Þ¥¤¥¯¥íÉøå¤Ë¥·¥°¥Ê¥ë¤òÁ÷¤ëͽÄê¤ò¤¹¤ë
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .nf
37 .B "#include <unistd.h>"
38 .sp
39 .BI "useconds_t ualarm(useconds_t " usecs ", useconds_t " interval );
40 .fi
41 .sp
42 .in -4n
43 .\"O Feature Test Macro Requirements for glibc (see
44 .\"O .BR feature_test_macros (7)):
45 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
46 .RB ( feature_test_macros (7)
47 »²¾È):
48 .in
49 .sp
50 .BR ualarm ():
51 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
52 .\"O .SH DESCRIPTION
53 .SH ÀâÌÀ
54 .\"O The
55 .\"O .BR ualarm ()
56 .\"O function causes the signal
57 .\"O .B SIGALRM
58 .\"O to be sent to the invoking process after (not less than)
59 .\"O .I usecs
60 .\"O microseconds.
61 .BR ualarm ()
62 ´Ø¿ô¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ËÂФ·¤Æ
63 .I usecs
64 ¥Þ¥¤¥¯¥íÉà(°Ê¾å) ¸å¤Ë
65 .B SIGALRM
66 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
67 .\"O The delay may be lengthened slightly by any system activity
68 .\"O or by the time spent processing the call or by the
69 .\"O granularity of system timers.
70 ÃÙ¤ì¤Ï¥·¥¹¥Æ¥à¤Î³èÀ­ÅÙ¡¦¸Æ¤Ó½Ð¤·¤Î½èÍý»þ´Ö¡¦
71 ¥·¥¹¥Æ¥à¥¿¥¤¥Þ¡¼¤ÎγÅ٤ˤè¤Ã¤ÆŤ¯¤Ê¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
72 .LP
73 .\"O Unless caught or ignored, the
74 .\"O .B SIGALRM
75 .\"O signal will terminate the process.
76 Ê᪤ޤ¿¤Ï̵»ë¤µ¤ì¤Ê¤¤¸Â¤ê¡¢
77 .B SIGALRM
78 ¥·¥°¥Ê¥ë¤Ï¥×¥í¥»¥¹¤ò½ªÎ»¤µ¤»¤ë¡£
79 .LP
80 .\"O If the
81 .\"O .I interval
82 .\"O argument is nonzero, further
83 .\"O .B SIGALRM
84 .\"O signals will be sent every
85 .\"O .I interval
86 .\"O microseconds after the first.
87 .I interval
88 °ú¤­¿ô¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¡¢ºÇ½é¤Î
89 .B SIGALRM
90 ¥·¥°¥Ê¥ë¤Î¸å¡¢
91 ¤µ¤é¤Ë
92 .I interval
93 ¥Þ¥¤¥¯¥íÉÃËè¤Ë SIGALRM ¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¤ë¡£
94 .\"O .SH "RETURN VALUE"
95 .SH ÊÖ¤êÃÍ
96 .\"O This function returns the number of microseconds remaining for
97 .\"O any alarm that was previously set, or 0 if no alarm was pending.
98 ¤³¤Î´Ø¿ô¤Ï¡¢²áµî¤ËÀßÄꤵ¤ì¤¿ alarm ¤Î»Ä¤ê¥Þ¥¤¥¯¥íÉÿô¤òÊÖ¤¹¡£
99 ¼Â¹ÔÃæ¤Î alarm ¤¬¤Ê¤¤¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
100 .\"O .SH ERRORS
101 .SH ¥¨¥é¡¼
102 .TP
103 .B EINTR
104 .\"O Interrupted by a signal.
105 ¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤¿¡£
106 .TP
107 .B EINVAL
108 .\"O \fIusecs\fP or \fIinterval\fP is not smaller than 1000000.
109 .\"O (On systems where that is considered an error.)
110 \fIusecs\fP ¤Þ¤¿¤Ï \fIinterval\fP ¤¬ 1000000 Ì¤Ëþ¤Ç¤Ê¤¤
111 (¤³¤ì¤¬¥¨¥é¡¼¤È¤·¤Æ°·¤ï¤ì¤ë¥·¥¹¥Æ¥à¤Î¾ì¹ç)¡£
112 .\"O .SH "CONFORMING TO"
113 .SH ½àµò
114 4.3BSD, POSIX.1-2001.
115 .\"O POSIX.1-2001 marks
116 .\"O .BR ualarm ()
117 .\"O as obsolete.
118 POSIX.1-2001 ¤Ç¤Ï
119 .BR ualarm ()
120 ¤Ï²áµî¤Î¤â¤Î¤È¤µ¤ì¤Æ¤¤¤ë¡£
121 .\"O POSIX.1-2008 removes the specification of
122 .\"O .BR ualarm ().
123 POSIX.1-2008 ¤Ç¤Ï¡¢
124 .BR ualarm ()
125 ¤Î»ÅÍͤ¬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
126 .\"O 4.3BSD, SUSv2, and POSIX do not define any errors.
127 4.3BSD, SUSv2, POSIX ¤Ï¥¨¥é¡¼¤òÄêµÁ¤·¤Æ¤¤¤Ê¤¤¡£
128 .\"O .SH NOTES
129 .SH Ãí°Õ
130 .\"O The type
131 .\"O .I useconds_t
132 .\"O is an unsigned integer type capable of holding integers
133 .\"O in the range [0,1000000].
134 .I useconds_t
135 ·¿¤Ï [0,1000000] ¤ÎÈϰϤÎÀ°¿ô¤òÊÝ»ý¤Ç¤­¤ëÉä¹æ¤Ê¤·À°¿ô·¿¤Ç¤¢¤ë¡£
136 .\"O On the original BSD implementation, and in glibc before version 2.1,
137 .\"O the arguments to
138 .\"O .BR ualarm ()
139 .\"O were instead typed as
140 .\"O .IR "unsigned int" .
141 ¤â¤È¤â¤È¤Î BSD ¤Ç¤Î¼ÂÁõ¤ä¡¢¥Ð¡¼¥¸¥ç¥ó 2.1 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢
142 .BR ualarm ()
143 ¤Î°ú¤­¿ô¤Î·¿¤Ï
144 .I "unsigned int"
145 ¤Ç¤¢¤Ã¤¿¡£
146 .\"O Programs will be more portable if they never mention
147 .\"O .I useconds_t
148 .\"O explicitly.
149 ¥×¥í¥°¥é¥àÃæ¤ËÌÀ¼¨Åª¤Ë
150 .I useconds_t
151 ¤È½ñ¤«¤Ê¤¤Êý¤¬¡¢°Ü¿¢À­¤¬¹â¤¯¤Ê¤ë¡£
152 .\"Osato:
153 .\"Osato: mention ¤¬Ìõ¤·¤Å¤é¤¤¡£
154 .\"Osato:
155 .LP
156 .\"O The interaction of this function with
157 .\"O other timer functions such as
158 ¤³¤Î´Ø¿ô¤È
159 .BR alarm (2),
160 .BR sleep (3),
161 .BR nanosleep (2),
162 .BR setitimer (2),
163 .BR timer_create (2),
164 .BR timer_delete (2),
165 .BR timer_getoverrun (2),
166 .BR timer_gettime (2),
167 .BR timer_settime (2),
168 .BR usleep (3)
169 .\"O is unspecified.
170 ¤Î¤è¤¦¤Ê¾¤Î¥¿¥¤¥Þ¡¼´Ø¿ô¤È¤ÎÁê¸ßºîÍѤϵ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
171 .LP
172 .\"O This function is obsolete.
173 .\"O Use
174 .\"O .BR setitimer (2)
175 .\"O or POSIX interval timers
176 .\"O .RB ( timer_create (2),
177 .\"O etc.)
178 .\"O instead.
179 ¤³¤Î´Ø¿ô¤ÏÇÑ»ßͽÄê¤Ç¤¢¤ë¡£
180 Âå¤ï¤ê¤Ë
181 .BR setitimer (2)
182 ¤â¤·¤¯¤Ï POSIX ¥¤¥ó¥¿¡¼¥Ð¥ë¥¿¥¤¥Þ
183 .RB ( timer_create (2)
184 ¤Ê¤É) ¤ò»È¤¦¤³¤È¡£
185 .\"O .SH "SEE ALSO"
186 .SH ´ØÏ¢¹àÌÜ
187 .BR alarm (2),
188 .BR getitimer (2),
189 .BR nanosleep (2),
190 .BR select (2),
191 .BR setitimer (2),
192 .BR usleep (3),
193 .BR time (7)