Send SIGTERM after SIGINT
See original GitHub issueIssue Description
Hi again!!!
Usually, when we want to kill a process, we’ll first try to gracefully kill it. If it refuses to die, we may send another signal to force it to die.
Currently in huey
, if we send a SIGINT
to consumer, it’ll set the stop flag and try to join the workers. If the workers refuse to die, the consumer has no choice but to wait. If we send another SIGTERM
to consumer, it won’t work because the corresponding signal handler only sets some variables. There doesn’t seem to be a way to tell the consumer to not wait anymore and the second SIGTERM signal may be meaningless.
I think it’ll be useful if huey
provides the option that users can first try to gracefully kill the consumer, and also ungracefully kill the consumer if it won’t die.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
send SIGTERM with command line shortcut - Super User
No, SIGTERM cannot be sent from the command line, ... Ctrl + C sends SIGINT which asks to interrupt a program but can...
Read more >SIGINT And Other Termination Signals in Linux - Baeldung
One common way of using SIGKILL is to first send SIGTERM. We give the process some time to terminate, we may also send...
Read more >kill - End a process or job, or send it a signal - IBM
kill ends a process by sending it a signal. The default signal is SIGTERM. kill is a built-in shell command. In the tcsh...
Read more >Linux short simple command how to send SIGTERM to a ...
sudo timeout -vk 5 10 kill PIDhere. Will execute kill , and then attempt to terminate that process if it takes too long....
Read more >Execute command or function when SIGINT or SIGTERM is ...
trap - SIGINT SIGTERM # clear the trap kill -- -$$ # Sends SIGTERM to child/sub ... You can do that with something...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pushed 2.1.3 with this change.
Ah, I guess it is behaving differently with processes than when using threads. I just made a test of using TERM with a blocked worker and indeed – the worker does not shut down immediately. Let me look into it.