Signals

Download posix eBook

Syntax

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

Parameters

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.

Related Examples

Stats

48 Contributors: 5
Wednesday, March 22, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook