set a process alarm clock
cc . . . -lc
unsigned int alarm(unsigned int seconds);
The alarm function causes the system to send the calling
process a SIGALRM signal after the number of
real time seconds has elapsed. If seconds is zero (0),
a pending alarm request, if any, is cancelled. Processor
scheduling delays may prevent the process from handling the
signal as soon as it is generated.
for more information on SIGALRM.
alarm requests are not stacked;
successive calls reset the alarm clock of the calling process.
system call sets the alarm clock
of a child process to 0.
A process created by the
family of calls inherits the time
left on the old process's alarm clock.
The alarm function is always successful and no return
value is reserved to indicate an error. This function returns
the amount of time, in seconds, remaining before the system is
scheduled to generate the SIGALRM signal from the
previous call to alarm, or zero if there was no
previous alarm request.
alarm is conformant with:
X/Open Portability Guide, Issue 3, 1989
IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1)
NIST FIPS 151-1
© 2005 System Services (S-osr5)
SCO OpenServer Release 6.0.0 -- 02 June 2005