Send a signal to a process
Integer_Type unix_kill (Integer_Type pid, Integer_Type sig)
This function may be used to send a signal given by the integer sig
to the process specified by pid
. The function returns zero upon
sucess and -1
upon failure setting errno accordingly.
The unix_kill
function may be used to determine whether or not
a specific process exists:
define process_exists (pid)
{
if (-1 == unix_kill (pid, 0))
return 0; % Process does not exist
return 1;
}
The unix_kill
function is not available on all systems.
getpid