python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Linux short simple command how to send SIGTERM to a process and SIGKILL if it fails to exist in X seconds?
How should look the Linux command to send terminate signal to the process/PID and if it fails to exit gracefully after 10 seconds kill it?
My attempt is: "sudo timeout -vk 5 10 kill PIDhere"...
16851556
Votes: 0
Answers: 1
How to stop all background processes(running functions) by using Trap?
I have two long running functions which needs to be executed asynchronously. For simplicity, assume one function sends Mail to client every 10 seconds & other logs text file every two seconds.
I c...
Mysterious Jack
Votes: 0
Answers: 2
How python subprocess can detect a negative exit code? How to force it return 0 instead?
I'm using pkill to send USR2 signal to suricata by python subprocess as below:
#!/usr/bin/python3
script_command='pkill -SIGUSR2 -f /usr/bin/suricata'
exit_status = subprocess.call(script_command, en...
Nguyễn Louis
Votes: 0
Answers: 1