Signalling processes is security-sensitive. It has led in the past to the following vulnerabilities:

Sending signals without checking properly which process will receive it can cause a denial of service.

Ask Yourself Whether

There is a risk if you answered yes to any of those questions.

Recommended Secure Coding Practices

Sensitive Code Example

import os

def send_signal(pid, sig, pgid):
    os.kill(pid, sig)  # Sensitive
    os.killpg(pgid, sig)  # Sensitive

See