POSIX Signals


  • unsigned alarm(unsigned seconds);
  • int kill(pid_t pid, int sig);


Function, Parameter(s), Return ValueDescription
alarm()function name
unsigned secondsSeconds to raise an alarm or 0 to cancel any pending alarm
>= 00 if no other alarm was pending, else the number of seconds the pending alarm still had open. This function won't fail.
kill()function name
pid_t pid.
int sig0 or signal ID
0, -1On success 0 is returned, -1 on failure with setting errno to EINVAL, EPERMor ESRCH.