ualarm
[unix-history] / usr / src / lib / libc / gen / alarm.3
CommitLineData
2a3097bc
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
a3b60616 5.\" @(#)alarm.3 6.2 (Berkeley) %G%
2a3097bc 6.\"
1175877f 7.TH ALARM 3C ""
2a3097bc
KM
8.UC 4
9.SH NAME
10alarm \- schedule signal after specified time
11.SH SYNOPSIS
12.nf
13.B alarm(seconds)
14.B unsigned seconds;
15.fi
16.SH DESCRIPTION
e880103b
KM
17.ft B
18This interface is obsoleted by setitimer(2).
19.ft R
20.PP
2a3097bc
KM
21.I Alarm
22causes signal SIGALRM, see
a3b60616 23.IR sigvec (2),
2a3097bc
KM
24to be sent to the invoking process
25in a number of seconds given by the argument.
26Unless caught or ignored, the signal terminates the process.
27.PP
e880103b 28Alarm requests are not stacked; successive calls reset the alarm clock.
2a3097bc 29If the argument is 0, any alarm request is canceled.
e880103b 30Because of scheduling delays,
2a3097bc
KM
31resumption of execution of when the signal is
32caught may be delayed an arbitrary amount.
33The longest specifiable delay time is 2147483647 seconds.
34.PP
e880103b 35The return value is the amount of time previously remaining in the alarm clock.
2a3097bc 36.SH "SEE ALSO"
a3b60616 37sigpause(2), sigvec(2), signal(3C), sleep(3), ualarm(3), usleep(3)