9.74 send_signal

int send_signal(int pid, int signal);

This syscall sends the passed signal to the passed PID.

pid can be one of four values:

Only processes sharing the same UID or EUID as the caller’s EUID can be signaled. The MAC_CAP_SIGNALALL capability overrides this check.

If signal is 0, instead of a signal being sent, only the permissions to send one are checked.

It returns 0 on success and -1 on failure, with the following errno:

ESRCH

pid is not a valid target for sending.

EPERM

The caller does not have permissions to signal pid.

EINVAL

signal is not a valid signal.