fix safe sending signals (spelling mistake)

os.pidfile_open should be os.pidfd_open.
This was not noticed as the linux kernel this software is tested on does
not support the required syscalls.
os.pidfile was replaced by os.open
as os.pidfd_open requires at least linux 5.3 and
signal.pidfd_send_signal requires at least linux 5.1.

see also 7483451577
pull/147/head
seebye 3 years ago
parent e3ea6d651f
commit f5414aa201

@ -48,7 +48,7 @@ def send_signal_safe(own_pid, target_pid):
"""
pidfile = None
try:
pidfile = os.pidfile_open(target_pid)
pidfile = os.open(f'/proc/{target_pid}', os.O_DIRECTORY)
if is_same_command(own_pid, target_pid):
signal.pidfd_send_signal(pidfile, signal.SIGUSR1)
except FileNotFoundError:

Loading…
Cancel
Save