Ken Arnold's version from UNIX Review
[unix-history] / usr / src / lib / libc / gen / alarm.3
... / ...
CommitLineData
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.\"
5.\" @(#)alarm.3 6.3 (Berkeley) %G%
6.\"
7.TH ALARM 3C ""
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
17.ft B
18This interface is made obsolete by setitimer(2).
19.ft R
20.PP
21.I Alarm
22causes signal SIGALRM, see
23.IR sigvec (2),
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
28Alarm requests are not stacked; successive calls reset the alarm clock.
29If the argument is 0, any alarm request is canceled.
30Because of scheduling delays,
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
35The return value is the amount of time previously remaining in the alarm clock.
36.SH "SEE ALSO"
37sigpause(2), sigvec(2), signal(3C), sleep(3), ualarm(3), usleep(3)