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
1
vote
0 answers
Apache httpd 2.4.34 couldn't receive signal SIGTERM on SuSE 15
I have install apache httpd 2.4.34 on SLES 15, and there are six httpd processes running.
When I send signal SIGTERM to httpd process, all the six httpd process couldn't receive signal SIGTERM (I had gdb attched httpd process to catch signal…

Wen MingCai
- 21
- 4
1
vote
1 answer
How to kill threads that are listening to message queue elegantly
In my Python application, I have a function that consumes message from Amazon SQS FIFO queue.
def consume_msgs():
sqs = boto3.client('sqs',
region_name='us-east-1',
aws_access_key_id=AWS_ACCESS_KEY_ID,
…

ddd
- 4,665
- 14
- 69
- 125
1
vote
1 answer
postgresql bgworker SIGTERM handler called twice
Im using postgresql 10.1 on Mac.
I have a trouble in terminating a background worker using SIGTERM.
In my project, im creating a new background worker using RegisterBackgroundWorker().
i have included a test_function, as a signal handler for…

krithikaGopalakrishnan
- 1,217
- 10
- 28
1
vote
1 answer
Catching SIGTERM, and sleep preventing it working
I have some code written in C (working on ubuntu 17):
void sig_stop(int sig_num) {
/* Some cleanup that needs to be done */
}
void some_routine(const char *array[], const int length) {
/* Initialization */
signal(SIGTERM, sig_stop);
…

Athena
- 320
- 2
- 12
1
vote
0 answers
Script run locally but fail on Jenkins (Got SIGTERM, exiting)
I'm trying to run a script from jenkins (with using expect) - The script run correctly while I'm trying to run it from a jenkins slave locally.
However, when I trigger a job to run it, the script fails and throws an error of:
11:05:47…

ForMartha
- 107
- 1
- 10
1
vote
1 answer
Heroku H13 error with Passenger
I've been receiving constant H13 errors in Heroku when a dyno shuts down due to autoscaling. An H13 error means that the connection has been closed before a response is given.
From the logs, you can see that Heroku sends a SIGTERM when it scales…

Manu Kanthan
- 197
- 15
1
vote
1 answer
SIGTERM not reported as 143 during trap
#!/bin/sh
echo "Running $(basename $0) $*"
function on_err {
echo $?
echo "error happened"
}
trap "on_err" 2 15
while true
do
:
done
$ kill -15 pid
gives
0
error happened
I was hoping to see
143
error happened

Ankur Agarwal
- 23,692
- 41
- 137
- 208
1
vote
0 answers
Does waitpid alone enough to kill a process?
Does this line of code kill and reap a child process without a kill operation?
waitpid(pid,&cs,0);
Or, must it be in this format to kill and reap a process?
kill(pid,SIGTERM);
waitpid(pid,&cs,0);

Yazgan
- 151
- 11
1
vote
0 answers
cannot trap SIGINT signal for bash shell
I have a script that calls
#!/usr/bin/env bash
my_trap(){
echo "signal was trapped";
}
trap my_trap INT
trap my_trap SIGINT
echo "here is the pid: $$"
echo "here is the parent id just in case: $(ps -o ppid= -p $$)"
tsc --watch # open a server /…

Alexander Mills
- 90,741
- 139
- 482
- 817
1
vote
1 answer
PHP 5.6 signal handling: declare(ticks=1) vs pcntl_signal_dispatch()
I'm writing a daemon in PHP 5.6. So far, it is basically a Daemon class with a mainLoop() method that has an infinite loop. In each iteration, the mainLoop executes a series of steps.
I need it to implement a "graceful kill" mechanism: if a SIGINT…

Andrea Rossi
- 981
- 1
- 10
- 23
1
vote
1 answer
python SIGTERM not work when I use multiprocessing Pool
Correct code as expected:
from multiprocessing import Pool
import signal
import time
import os
def consumer(i):
while True:
# print os.getpid()
pass
def handler(signum, frame):
print 'Here you…

jc hou
- 15
- 7
1
vote
1 answer
Shutdown thread disappears when performing endpoints call
I have a Java application running on Ubuntu 16.04 LTS.
When the application receives a shutdown signal, a shutdown sequence is run like this:
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
…

Oliver Hausler
- 4,900
- 4
- 35
- 70
1
vote
1 answer
Why did Spark standalone Worker node-1 terminate after RECEIVED SIGNAL 15: SIGTERM?
Note: This error was thrown before the components were executed by spark.
Logs
Worker Node1:
17/05/18 23:12:52 INFO Worker: Successfully registered with master spark://spark-master-1.com:7077
17/05/18 23:58:41 ERROR Worker: RECEIVED SIGNAL 15:…

Dixon Joseph Dalmeida
- 302
- 3
- 23
1
vote
1 answer
mvn jetty:run-forked inside a docker container?
I have an application that uses the jetty maven plugin "run-forked" goal that I need to dockerize. What happens is that maven starts, the container exists only for about 10 seconds and then dies when maven exits after it forks the child JVM…

Christopher Johnson
- 302
- 4
- 12
1
vote
1 answer
Julia 0.4.7: How to catch SIGTERM
I am getting the following stacktrace after SIGTERM (not SIGINT) event in a julia-0.4.7 script:
signal (15): Terminate
write at /lib64/libpthread.so.0 (unknown line)
unknown function (ip: 0x2ade16a02893)
uv_write2 at…

frank
- 103
- 10