xref: /csrg-svn/lib/libc/gen/alarm.3 (revision 66937)
1*66937Sbostic.\" Copyright (c) 1980, 1991, 1993, 1994
261111Sbostic.\"	The Regents of the University of California.  All rights reserved.
320104Smckusick.\"
448352Scael.\" %sccs.include.redist.man%
520104Smckusick.\"
6*66937Sbostic.\"     @(#)alarm.3	8.2 (Berkeley) 04/19/94
748352Scael.\"
848352Scael.Dd
948352Scael.Dt ALARM 3
1048352Scael.Os BSD 4
1148352Scael.Sh NAME
1248352Scael.Nm alarm
1348352Scael.Nd set signal timer alarm
1448352Scael.Sh SYNOPSIS
1548352Scael.Fd #include <unistd.h>
1648352Scael.Ft u_int
1748352Scael.Fn alarm "u_int seconds"
1848352Scael.Sh DESCRIPTION
1948352Scael.Bf -symbolic
2028808SkjdThis interface is made obsolete by setitimer(2).
2148352Scael.Ef
2248352Scael.Pp
2348352ScaelThe
2448352Scael.Fn alarm
2548352Scaelfunction
2648352Scaelwaits a count of
2748352Scael.Ar seconds
2848352Scaelbefore asserting the terminating signal
2948352Scael.Dv SIGALRM .
3048352ScaelWhen the signal has successfully been caught,
3148352Scael.Fn alarm
3248352Scaelreturns the amount of time left on the clock.
33*66937SbosticThe maximum number of
3448352Scael.Ar seconds
3548352Scaelallowed
3648352Scaelis 2147483647.
3748352Scael.Pp
3848352ScaelIf an alarm has been set with
3948352Scael.Fn alarm ,
4048352Scaelanother call to
4148352Scael.Fn alarm
42*66937Sbosticwill supersede the prior call.
4348352ScaelThe request
4448352Scael.Fn alarm "0"
4548352Scaelvoids the current
4648352Scaelalarm.
4748352Scael.Sh SEE ALSO
4848352Scael.Xr sigaction 2 ,
4948352Scael.Xr setitimer 2 ,
5048352Scael.Xr sigpause 2 ,
5148352Scael.Xr sigvec 2 ,
5248352Scael.Xr signal 3 ,
5348352Scael.Xr sleep 3 ,
5448352Scael.Xr ualarm 3 ,
5548352Scael.Xr usleep 3
5648352Scael.Sh HISTORY
5748352ScaelAn
5848352Scael.Fn alarm
5948352Scaelfunction appeared in
6048352Scael.At v7 .
61