kill: sending signals to a process group with -pid results on the signal being deliver to the caller process instead of target (found in 3.3.17)
Seems like there has been a change in behaviour between 3.3.16 and 3.3.17 when killing process groups with kill command. Kill command no longer sends signals to the specific process group, but instead delivers the signal to the process that executes the kill command, as illustrated with the following test:
python3 -c "import subprocess
import time
import os
subprocess.run(['/bin/kill', '-V'])
proc = subprocess.Popen(['sleep', '5'], preexec_fn=lambda: os.setpgid(os.getpid(), os.getpid()))
subprocess.run(['/bin/kill', '-TERM', f'-{proc.pid}'])
print(proc.wait(), proc.returncode)
time.sleep(1)
print('Still alive')"
kill from procps-ng 3.3.16
-15 -15
Still alive
vs
kill from procps-ng 3.3.17
Terminated