alarm - 시그널 전달을 위한 알람을 설정한다.
#include <unistd.h>
unsigned int alarm(unsigned int seconds);
alarm() arranges for a SIGALRM signal to be delivered to the calling process in seconds seconds.
If seconds is zero, any pending alarm is canceled.
어떤 경우에도 이전에 설정된 alarm()은 은 취소된다.
alarm()은 이전에 설정된 알람이 시그널을 전달할 때까지 남은 시간을 초 단위의 숫자로 반환하거나, 이전에 설정된 알람이 없다면 0을 반환한다.
POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
alarm() 과 setitimer(2)EN는 같은 타이머를 공유한다; 한 쪽을 호출하면 다른 쪽을 간섭할 것이다.
Alarms created by alarm() are preserved across execve(2)EN and are not inherited by children created via fork(2)EN.
sleep(3)EN may be implemented using SIGALRM; mixing calls to alarm() and sleep(3)EN is a bad idea.
스케줄링 지연이 임의의 시간 동안 프로세스의 수행을 지연시킬 수도 있다.