xref: /csrg-svn/lib/libc/gen/alarm.3 (revision 48352)
1*48352Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
2*48352Scael.\" All rights reserved.
320104Smckusick.\"
4*48352Scael.\" %sccs.include.redist.man%
520104Smckusick.\"
6*48352Scael.\"     @(#)alarm.3	6.4 (Berkeley) 04/19/91
7*48352Scael.\"
8*48352Scael.Dd
9*48352Scael.Dt ALARM 3
10*48352Scael.Os BSD 4
11*48352Scael.Sh NAME
12*48352Scael.Nm alarm
13*48352Scael.Nd set signal timer alarm
14*48352Scael.Sh SYNOPSIS
15*48352Scael.Fd #include <unistd.h>
16*48352Scael.Ft u_int
17*48352Scael.Fn alarm "u_int seconds"
18*48352Scael.Sh DESCRIPTION
19*48352Scael.Bf -symbolic
2028808SkjdThis interface is made obsolete by setitimer(2).
21*48352Scael.Ef
22*48352Scael.Pp
23*48352ScaelThe
24*48352Scael.Fn alarm
25*48352Scaelfunction
26*48352Scaelwaits a count of
27*48352Scael.Ar seconds
28*48352Scaelbefore asserting the terminating signal
29*48352Scael.Dv SIGALRM .
30*48352ScaelWhen the signal has successfully been caught,
31*48352Scael.Fn alarm
32*48352Scaelreturns the amount of time left on the clock.
33*48352ScaelThe maximum mumber of
34*48352Scael.Ar seconds
35*48352Scaelallowed
36*48352Scaelis 2147483647.
37*48352Scael.Pp
38*48352ScaelIf an alarm has been set with
39*48352Scael.Fn alarm ,
40*48352Scaelanother call to
41*48352Scael.Fn alarm
42*48352Scaelwill superceed the prior call.
43*48352ScaelThe request
44*48352Scael.Fn alarm "0"
45*48352Scaelvoids the current
46*48352Scaelalarm.
47*48352Scael.Sh SEE ALSO
48*48352Scael.Xr sigaction 2 ,
49*48352Scael.Xr setitimer 2 ,
50*48352Scael.Xr sigpause 2 ,
51*48352Scael.Xr sigvec 2 ,
52*48352Scael.Xr signal 3 ,
53*48352Scael.Xr sleep 3 ,
54*48352Scael.Xr ualarm 3 ,
55*48352Scael.Xr usleep 3
56*48352Scael.Sh HISTORY
57*48352ScaelAn
58*48352Scael.Fn alarm
59*48352Scaelfunction appeared in
60*48352Scael.At v7 .
61