VMS Help
CRTL, alarm
*Conan The Librarian
|
Sends the signal SIGALRM (defined in the <signal.h> header file)
to the invoking process after the number of seconds indicated by
its argument has elapsed.
Format
#include <unistd.h>
unsigned int alarm (unsigned int seconds); (ISO POSIX-1)
int alarm (unsigned int seconds); (Compatibility)
seconds
Has a maximum limit of LONG_MAX seconds.
Calling the alarm function with a 0 argument cancels any pending
alarms.
Unless it is intercepted or ignored, the signal generated by
alarm terminates the process. Successive alarm calls reinitialize
the alarm clock. Alarms are not stacked.
Because the clock has a 1-second resolution, the signal may
occur up to 1 second early. If the SIGALRM signal is intercepted,
resumption of execution may be held up due to scheduling delays.
When the SIGALRM signal is generated, a call to SYS$WAKE is
generated whether or not the process is hibernating. The pending
wake causes the current pause() to return immediately (after
completing any function that catches the SIGALRM).
n The number of seconds remaining from a
previous alarm request.