*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> alarm (2)              



NAME    [Toc]    [Back]

       alarm - set an alarm clock for delivery of a signal

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       unsigned int alarm(unsigned int seconds);

DESCRIPTION    [Toc]    [Back]

       alarm  arranges	for a SIGALRM signal to be delivered to the process in
       seconds seconds.

       If seconds is zero, no new alarm is scheduled.

       In any event any previously set alarm is cancelled.

RETURN VALUE    [Toc]    [Back]

       alarm returns the number of  seconds  remaining	until  any  previously
       scheduled alarm was due to be delivered, or zero if there was no previously
 scheduled alarm.

NOTES    [Toc]    [Back]

       alarm and setitimer share the same timer; calls to one  will  interfere
       with use of the other.

       sleep()	may  be implemented using SIGALRM; mixing calls to alarm() and
       sleep() is a bad idea.

       Scheduling delays can, as ever, cause the execution of the  process  to
       be delayed by an arbitrary amount of time.

CONFORMING TO    [Toc]    [Back]

       SVr4, SVID, POSIX, X/OPEN, BSD 4.3

SEE ALSO    [Toc]    [Back]

       setitimer(2),   signal(2),  sigaction(2),  gettimeofday(2),  select(2),
       pause(2), sleep(3)

Linux				  1993-07-21			      ALARM(2)
[ Back ]
 Similar pages
Name OS Title
alarm IRIX set a process alarm clock
alarm HP-UX set a process's alarm clock
sigaction Tru64 Specify the action to take upon delivery of a signal
pxfalarm IRIX Schedule alarm signal
alarm NetBSD set signal timer alarm
alarm FreeBSD set signal timer alarm
alarm OpenBSD set signal timer alarm
mailconfig Tru64 Sets up the routing and delivery of mail for the system.
sigblock IRIX block signals from delivery to process (4.3BSD)
pthread_testcancel Tru64 Requests delivery of a pending cancellation request to the calling thread
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service