aallaarrmm() -- System Call (libc)

Set a timer
#iinncclluuddee <uunniissttdd.hh>
aallaarrmm(_n)
uunnssiiggnneedd _n;

aallaarrmm() sets a timer associated with  the requesting process to go off in _n
seconds.   After _n  seconds, the  system sends the  signal SSIIGGAALLAARRMM  to the
process.  An argument of zero turns off the alarm timer.

By  default, the  receipt of  the SSIIGGAALLAARRMM  signal terminates  the process.
However,  it  may  be caught  or  ignored  by  using  ssiiggnnaall(). Because  of
scheduling variation and the  one second granularity, the action of aallaarrmm()
is predictable only to within one second.

aallaarrmm()  is useful  for such  things as timeouts.   For example,  the login
process on  a dial-in port might  hang up the line  after a sufficient time
has elapsed with no user response.

aallaarrmm()  returns  the  previous  alarm  value,  which represents  the  time
remaining from the previous call.   Time remaining is superseded by the new
alarm value.

_S_e_e _A_l_s_o
lliibbcc, ssiiggnnaall(), sslleeeepp(), uunniissttdd.hh
POSIX Standard, section 3.4.1

_N_o_t_e_s
Each process  can set only one  alarm at a time.   aallaarrmm() and aallaarrmm22() use
the same mechanism for setting alarms.
