Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [kill]

kill - Send a specified signal to a process or process group.

4
votes
1answer
497 views

Apart from USR1 and USR2, which signals can I safely use for custom interrupting behavior? (in python)

I have a complex application with USR1 and USR2 already defined as having a well-defined and not replaceable purpose. There are tons of different signals in linux. Might there be another one (maybe a ...
4
votes
1answer
2k views

kill or kick all clients from a running vncserver without restarting the server

I encounter quite often the problem, that I want to kick all connected clients from a running vncserver. Even better would be to be able to kick / kill even certain clients. With netstat -tupa | grep ...
2
votes
1answer
48 views

Why is “A stop job is running” a good design choice?

In a typical modern Linux distribution, the user may experience this when trying to shut down the computer: "A stop job is running for Session c2 of user", or equivalent. Now, I understand the idea ...
2
votes
1answer
402 views

How does systemd stop services that don't have a unit file

Systemd can inherit orphaned processes, and there are other ways a service can be running without having a unit file for the given service. I want to know what the catch-all is for services that don'...
2
votes
1answer
2k views

How to correctly stop busybox shell process and child process?

The actual server process is spawned by a shell script I am trying to write an init script for djb daemontools within Entware on a router running busybox 1.24 (ash shell). The daemontools way to ...
2
votes
1answer
395 views

Safely kill foreground process when a background process ends

There are two scripts, the first in the background, the second in the foreground: trap "ret=\$?; rm -f pipe1 pipe2; exit \$ret" EXIT INT TERM QUIT my.bin > pipe1 < pipe2 & my-term.sh pipe1 ...
2
votes
1answer
2k views

Kill a running shell script, and kill all process running within it

I have a shell script running in the background, which runs 5 different jobs. When I run the shell script all 5 jobs start running in order. When I kill this shell, whichever process is running, will ...
2
votes
1answer
178 views

Guard against killing an already killed process

I'm writing a script that tries to kill a process. But the process might already been killed by others. How can I guard against it and prevent this kill command from terminating my process with ...
1
vote
1answer
71 views

How to kill quiesce frozen process?

$ ps ax | grep process 73849 ?? ?E 0:00.00 (process name) 75882 ?? ?E 0:00.00 (process name) I have tried all the solution but it was impossible.
1
vote
1answer
704 views

How to kill off these processes?

Problem I have by mistake initiated a PHP background process script that calls itself and has now created an infinite loop of calling itself over and over. It currently sends an email to my Gmail ...
1
vote
1answer
448 views

Start python http server which can be stopped by anyone else

I would like to start a python SimpleHTTPServer instance but I would like to give the ability to everyone to stop it (execute kill -1). It wouldn't be a big deal to solve but I don't have the access ...
1
vote
1answer
554 views

How to kill all sessions for a Linux user except first one, and limit users to one login session

I need to know how to kill all processes for a logged in user except the first one in linux redhat 6. for example, AZain user is logged in multiple times from different machines so I need to allow ...
1
vote
1answer
205 views

Kill unresponsive process by name but preserve responsive processes

For some reason, I end up with a fair few Google Chrome Helper processes which stop responding, hogging CPU resources. Usually I just run killall Google\ Chrome\ Helper, however this kills all, ...
0
votes
1answer
422 views

“Killing” a zombie defunct process without killing its parent

I know there are hundreds of questions on "How to kill a defunct process" but in all of those I found the final answer was: "Don't worry. They don't use any resources." and that basically you either ...
0
votes
1answer
12 views

3 different apps with the same file name in different locations, how to kill one by its full name?

I'm running 3 apps with the same file name from different paths: $ ~/app1/main $ ~/app2/main $ ~/app3/main I want to create a bash script which accepts the full name to an executable file and ...
0
votes
1answer
47 views

Killing browser window takes too long or is impossible

It happens fairly often that, while browsing, suddenly the cursor (touchpad) starts moving sluggishly, the LED light on my USB stick starts flickering without stopping (I use a Linux live CD on memory ...
0
votes
1answer
318 views

How do I know which sleeping jobs are safe to `kill`?

I work on a linux machine connected to a cluster. If I do top on a terminal, I see many (~200) sleeping processes. Probably they were caused by me by inappropriately Ctrl+C-ing those processes. How ...
2
votes
0answers
429 views

File shows up in ls but cannot rm or mv, seems to be held by some unknown process

I do a lot of work on an SGE cluster running CentOS 7, and have recently had issues with jobs dying randomly, but seemingly with some processes still running that prevent me from cleaning up to start ...
2
votes
0answers
262 views

trapping signals without interfering with other signals

When trapping a signal in a shell script, the trap commands are not executed until the current command finishes. For example, consider the following shell script: #!/bin/bash trap 'echo "SIGTERM ...
2
votes
0answers
535 views

Killing processes in interruptible sleep state?

I'm inserting data from Server A, which is running a Node.js app, into a MySQL database on Server B. I first check for duplicate rows, and then INSERT or not depending on the result. This process can ...
2
votes
0answers
183 views

Running a process in a specified time window

Large computational tasks consume time and computational resources, therefore I am looking for a way to execute them in a specified time window using a shell script. I want to run the script batch.sh ...
2
votes
0answers
104 views

Dissable pid-namespace init process signal handler restriction

Ubuntu 16.04 / Linux version 4.4.0-47-generic / gcc version 5.4.0 I want to implement a container using linux cgroups and part of the implementation was to run the process into a new pid-namespace. ...
2
votes
0answers
424 views

killall doesn't work if I call it from a script

I'm starting a tcpdump inside a script and I also kill it from the same script. So I'm currently using the killall command for this: The script gets executed from an udev rule: This is the section, ...
2
votes
0answers
992 views

Catch the kill signal when a process is in S state [interruptible sleep]

This is the process group : (ps -ejH) xxxx xxxx xxxx ? 00:00:00 sshd yyyy yyyy yyyy ? 00:00:00 sshd 8713 8713 8713 pts/0 00:00:00 bash 1234 1234 1234 ? ...
2
votes
0answers
85 views

In AwesomeWM, is the use of `c:kill()` as soft as clicking on the red cross in another window manager?

In AwesomeWM, windows are closed with the method c:kill() (bound to Meta-Shift-c) When I use that key binding, the window just close instantly! Therefore I wondered : Is that way as soft as ...
1
vote
0answers
40 views

Killing a process when some other process is finished

Given a | b, i'd like to kill b when a is finished. b is an interactive process, which doesn't terminates when a is finished (fzf in my case), and the whole a | b is executed in a $() subshell. So ...
1
vote
0answers
102 views

could getaddrinfo or connect call get a process into D ( uninterruptible state )

It happened a few days in a row that one of our process couldn't be killed by "kill -9". The kill -9 used to be able to kill this process on daily base reliably for past 2+ years. This process has ...
1
vote
0answers
797 views

Kill running process

I own some old processes on a shared compute server. They consume a lot of CPU and according to htop they're in the running-state: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ ...
1
vote
0answers
246 views

When I killed tty1 root user on ubuntu14.04,the system reboot. Why?

When I enter who command in the shell, i got this: root tty1 2017-04-01 12:21 langxiaowei pts/2 2017-07-21 18:05 So, for the safe, I want to kill the root user. Then I enter the comamnd ...
1
vote
0answers
132 views

“Task manager” for killing hard-disk intensive processes?

Sometimes I want to be able to quickly kill the process that has the most intensive hard disk usage. How do I do it? With the solutions described here I would have to open another terminal to invoke ...
1
vote
0answers
262 views

Work with setsid to open a session and close it correctly

I would like to create the following script: -- run a python script with setsid -- python may or may not fail with exception -- check if all of the group processes were terminated correctly -- if ...
1
vote
0answers
473 views

varnishd killed by OOM, How can I configure the varnishd to avoid this problem?

The following error message is taken from my log message. varnishd server is getting killed for over use of memory. We have done all the possible settings to avoid it, Still the same problem happens ...
1
vote
0answers
351 views

What is the difference between the SIGHUP generated by typing “exit” in the SSH shell terminal vs clicking the “X” button in the PuTTY window?

Referring to this question, I am trying to use nohup <command> <arg> & to continue to run a command in the background after I logout from the SSH shell terminal. However, the ...
1
vote
0answers
605 views

Why do interrupted processes show up in nvidia-smi?

When ​I kill processes in terminal using C-c and run nvidia-smi, the process are still shown as "compute processes". These processes are no longer in the top resu​lts. I have to kill -9 to clean them (...
1
vote
0answers
150 views

killing subprocesses and traps

I have the following two scripts which simulate some work: start.sh simply launches 2 (mpi) processes with script mpiproc.sh. start.sh #!/bin/bash function trap_with_arg() { func="$1" ; shift ...
1
vote
0answers
522 views

CentOS Running process not responding to kill signals and not context switched

An updatedb process on my linux server is not responding to kill signals. (kill -9 or SIGSTOP) [root@chroot-1 ~]# ps auwx | grep -i 4505 root 4505 99.5 0.0 59544 1256 ? RN 09:43 112:...
1
vote
0answers
1k views

program “killed” as soon as it runs

Ubuntu 12.04 I have success with make, and output a program name algo. When I type ./algo,the terminal just directly shows 'killed' And I searched the var/log/message or syslog kern.log. I don't ...
1
vote
0answers
360 views

Why process is killed while a lot of memory is free?

I am running a python script in ipython. This script will take about 8GB RAM. The system has more than 80 GB free RAM but the swap is nearly 0. My script was killed after it runned for a while. I want ...
1
vote
0answers
785 views

Stop all processes by a user: children of supervisord are still running

I'm trying to delete a user but it keeps saying that user is currently used by process ID x I tried everything here and here, nothing works, how do I kill all the process by a certain user in order ...
1
vote
0answers
658 views

pkill -P $ID working while kill — -$ID not

I was playing around with creating and killing process groups on linux ( ubuntu ) I am trying to kill a process group and am being driven crazy by the fact that pkill -P $ID works while kill -- -$ID ...
1
vote
0answers
303 views

Rogue Java process brings my computer to a halt

In reference to my earlier post: Is there a log of past threads that are now closed? I gave the process a kill -STOP signal and started examining the details. I can't seem to figure out why it is ...
0
votes
0answers
73 views

How to stop/kill thread in process

I see all of threads according process with ps -T Is there any way to kill/ stop specific thread(not all the process) by thread id/thread name? I prefer with shell script but if it impassable so in ...
0
votes
0answers
55 views

Why can I not kill a process in the same line I start it using fuser?

I have been trying to kill a process by looking at the listening port and nothing seems to be working. The code is as follows: (code to open port 8545) && fuser -k 8545/tcp I also tried with ...
0
votes
0answers
33 views

Can I safely reduce CPU usage with kill -SIGSTOP?

I have 7 differents workspaces and each of them have a different purpose. But everything runs in the background... For exemple the workspace 5 with my browser is using CPU even when I'm on workspace ...
0
votes
0answers
47 views

Background process gets killed in ubuntu 16.04 server

I have a spring boot application and i'm running it as ROOT through this command: mvn spring-boot:run -Drun.jvmArguments="-Xms512m -Xmx1024m" > lms_logs.log 2>&1 & After a few hours ...
0
votes
0answers
54 views

Is it possible to distinguish signal from kernel at reboot and at kill from terminal

As I know, we can send a signal SIGTERM to a process by pressing ctrl+c or by using pkill -f processName. Also, when we reboot or shutdown, the kernel will send SIGTERM to each process too. So I'm ...
0
votes
0answers
107 views

Cannot kill my lsof processes even as root

My lsof is hung so bad that I can't even kill -9 it. Initially, it was owned by another process, foo. I tried killing foo, hoping that lsof would also go way. But while I was able to kill -9 foo, now ...
0
votes
0answers
136 views

Kill a process inside docker in a “R” state

I'm having a process on my server that I can't kill, even with kill -9. It's in R state in top and in ps, and it's running inside docker. It's a ls I've started in a very large folder. It's taking ...
0
votes
0answers
144 views

HP:the arguments in killall beyond `man killall`

In the tutorial here : /usr/bin/killall -HUP rsyslogd For the command : /usr/bin/killall -HUP rsyslogd In my os,the synopsis info in man killall SYNOPSIS killall [-Z, --context pattern] [-...
0
votes
0answers
618 views

Why are some processes “killable” by pkill but not killall?

I had over 20 instances of httpd (apache) processes running, so I decided to shutdown these. Normally I use killall, But when I typed killall httpd it just said: No matching processes belonging to ...