SIGTERM is one of the POSIX mandated signals; it indicates that the process should terminate, which is also the default action for SIGTERM.
Questions tagged [sigterm]
238 questions
0
votes
1 answer
I'm trying to used std::signal to cleanly end my multithreaded program, what am I doing wrong?
What I'm trying to do
I have various things that must run concurrently on a linux, until the program is told to stop through ctrl-C (in which case SIGINT is received) or the service is stopped (in which case SIGTERM is received)
What I've come up…

Eternal
- 2,648
- 2
- 15
- 21
0
votes
2 answers
Graceful shutdowns on Cloud Run
I'm referring to this article: Graceful Shutdowns on Cloud Run
The example outlines how to do this in Node.js.
How would one do this in Golang? Any issues with simply adding this to the func init() method?
func shutdownGracefully() {
c :=…

Jan Krynauw
- 1,042
- 10
- 21
0
votes
1 answer
SIGTERM + Rails + mysql?
I've suddenly started getting a lot of SignalException:SIGTERM exceptions in an application, apparently coming from mysql. Stacktraces…

jemminger
- 5,133
- 4
- 26
- 47
0
votes
1 answer
HAProxy ERR_EMPTY_RESPONSE
Server crashes and results in the following nondescript message:
root@haproxy:~# /usr/sbin/haproxy -V -d -Ws -f /etc/haproxy/haproxy.cfg
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
…

Sven R. Kunze
- 1,909
- 2
- 13
- 17
0
votes
1 answer
Not able to exit the child process properly using condition variable after handling a SIGTERM
I have created a child process where I am handling a SIGTERM sent from the parent process. In the child process I am waiting on a condition_variable cv inside a new thread waitingForWork(). cv is set by the SIGTERM signal handler inside…

Soumyajit Roy
- 463
- 2
- 8
- 17
0
votes
1 answer
Is it safe to send a SIGKILL to `git status`?
I want to stop Git if it takes too long to run git status, but Git seems to be ignoring SIGTERMs: Why does timeout not interrupt `git status` when it takes too long?
So it seems that one way to get around this is to use SIGKILL, but that you may hit…

Camelid
- 1,535
- 8
- 21
0
votes
1 answer
How to handle SIGTERM from different OS(Linux/Windows)
I created an ConsoleEventHandler based on the following link described: https://www.meziantou.net/detecting-console-closing-in-dotnet.htm
It works perfectly for me. Currently I wish it can handle SIGTERM from both Windows and Linux. Does anybody has…

Deritha
- 67
- 2
- 9
0
votes
1 answer
In Java, how can I limit the shut down hook only support SIGTERM?
I found that the runtime shutdown hook in Java can handle SIGTERM, SIGHUP, SIGINT and normal exit(0). However, I only want the hook to handle the SIGTERM signal. How can I limit it?
Simple example from geeksforgeeks:
public class ShutDownHook
{
…

Tianbo Zhang
- 27
- 1
- 4
0
votes
3 answers
Apache2 periodically using 100% CPU
I am fairly new to managing my own servers and have a problem where some Apache2 processes hog 100% of the CPU. This lasts for about half an hour and a couple of hours later, it will start again. It will even happen right after restarting Apache or…

Nik Isschick
- 31
- 1
- 3
0
votes
0 answers
Overriding SIGTERM isr in python 2.7 is not working in windows 7
In python script below, i am trying to catch SIGTERM signal (which may recived from other process) by installing my isr and overriding python default one. while this script works great in linux (not surprising), in windows it doesn't work (not…

Adam
- 2,820
- 1
- 13
- 33
0
votes
1 answer
Getting currently unacknowledged consumer messages in RabbitMQ
I'm trying to gracefully shutdown a process that is consuming messages off RabbitMQ. I know that I can use Channel.cancel to stop RabbitMQ from sending any new messages to the process, but I need to deal with any pending, unacknowledged messages as…

Fabis
- 1,932
- 2
- 20
- 37
0
votes
1 answer
Can't handle SIGTERM in Heroku app when deploying via docker
I am migrating an existing Heroku application to deploy with Docker instead of git. The application is using a custom SIGTERM handler which doesn't get called on dyno termination.
The SIGTERM handler works fine when deployed via git, but fails to…

sleirsgoevy
- 21
- 2
0
votes
1 answer
Swift on macOS: Running code on termination of background app
I am writing a Mac app that runs as a daemon in the background. How can I detect when the app is killed and run some cleanup code? I have tried catching signals such as SIGTERM, SIGINT, and SIGKILL, but my app structure seems to have some problems…

sschilli
- 2,021
- 1
- 13
- 33
0
votes
1 answer
Why doesn't bash script wait for its child processes to finish before exiting the parent script on receiving Sigterm?
trap exit_gracefully TERM
exit_gracefully() {
echo "start.sh got SIGTERM"
echo "Sending TERM to child_process_1_pid: ${child_process_1_pid}"
echo "Sending TERM to child_process_2_pid: ${child_process_2_pid}"
echo "Sending TERM to…

JavaDeveloper
- 5,320
- 16
- 79
- 132
0
votes
1 answer
Ubuntu service stops randomly with "Main Process exited, status 143/n/a"
My apps deployed as debians and started using systemd service.The app is getting crashed randomly. I am unable to find the reason for the crash.
I have 4 applications running[built using java, scala], out of which two are getting killed(named as op…

Yadu Krishnan
- 3,492
- 5
- 41
- 80