alarm() COHERENT System Call alarm() Set a timer alarm(n) unsigned n; alarm sets a timer associated with the requesting process to go off in n seconds. After n seconds, the system sends the signal SIGALRM to the process. An argument of zero turns off the alarm timer. By default, the receipt of the SIGALRM signal terminates the process. However, it may be caught or ignored by using signal. Because of scheduling variation and the one second granularity, the action of alarm is predictable only to within one second. alarm 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. alarm returns the previous alarm value, which represents the time remaining from the previous call. Time remaining is superseded by the new alarm value. ***** See Also ***** COHERENT system calls, signal(), sleep() COHERENT Lexicon Page 1