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

learn more… | top users | synonyms

0
votes
1answer
32 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 ...
5
votes
1answer
44 views

Suspend process without killing it

So I've got a persistent program running in the background. Killing it just causes it to restart with a different PID. I'd like to suspend it (put it to sleep without actually killing it). Does kill ...
1
vote
4answers
52 views

Why does killall command kill only one instance of the process?

Sometimes I need to kill Google Chrome (of which I have 2 windows/instances opened). Both instances are not in incognito mode. What I do is: (on Debian 8) killall chrome && killall chrome ...
3
votes
1answer
51 views

sigint not being propagated to background child process

I need to send SIGINT to terminate a process gracefully but I can't. This is a sample, because the environment in which the execution occurs is 'unknown' (a bash script in travis.com) I managed to ...
1
vote
3answers
23 views

Shutdown PC after suspending terminal process (apt-get upgrade)

What's going to happen if I shutdown my PC after suspending a terminal process (with Ctrl+Z)? In my case, it's sudo apt-get upgrade. The upgrade file size is 250 MB, it takes far more time downloading ...
1
vote
3answers
36 views

What does the option -9 mean for killall?

I saw the command killall -9 but there is not such a option in the man page. So now I'm a bit confused: what does -9 option mean?
4
votes
2answers
43 views

How can I kill my backticked yes process?

I was playing around in my terminal, which runs zsh. I typed the following: $ ` bquote> yes bquote> ` And then, yes started to run in the background, I think. Neither Ctrl + C nor Ctrl + \ ...
1
vote
1answer
37 views

use exec -a to name process but run it in the background immune to CTRL-C

I would like to start a background process from bash script, but at the same time give it another name and also make it immune to CTRL-C. I tried the following: exec -a NiceName java -cp ....long ...
2
votes
2answers
112 views

What is the difference between kill , pkill and killall

I am familiar with kill command , and most of the time we just use kill -9 to kill a process forcefully , there are many other signals that can be used with kill. But i wonder what are the use cases ...
1
vote
1answer
40 views

How to kill telnet started via SSH?

I am sending a command to remote server via SSH as ssh raja@remote_host "telnet 192.168.56.101 8080" But we all know that , to quit from telnet we need to get back to telnet prompt with CTRL+^] ...
2
votes
1answer
37 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
3
votes
1answer
39 views

Difference between less violent kill signal -HUP (1) -INT (2) and -TERM (15)

Apart from the most violent kill -9 (SIGKILL), I don't quite understand the difference between the 3 other common signals (here) -HUP (1), -INT (2), and -TERM (15). In which scenarios would one work ...
1
vote
1answer
26 views

How to programatically disconnect a ssh user?

I need to force a disconnect all sessions for a given user. Since this user might be root as well I think it would be better to avoid killing the parent sshd process along the way. Is there a ...
0
votes
1answer
32 views

How to extract all links from a given url in a decent time

I'm trying to extract the links from a specified url and redirect them to a file. At first I tried using --spider , this is my code: wget --spider --force-html -m http://file/path 2>&1 | grep ...
1
vote
0answers
59 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, ...
1
vote
1answer
42 views

How to kill all processes using a given GPU?

I use the CUDA toolkit to perform some computations on my Nvidia GPUs. How to kill all processes that use a given GPU? (killing at once, i.e. without having to manually type the PIDs behind kill -9.) ...
1
vote
1answer
61 views

wait for predefined time before exit the script

I have an app server running in my unix box with process name as abc_test. I have a shell script in which I have to stop my server using /opt/abc/bin/stop. Now sometimes my server doesn't get stopped ...
1
vote
2answers
70 views

Shell script to kill processes except those owned by user

I am Looking for some help in creating a script to kill processes, but return an error message if they are owned by root. Firstly I would like to say that I am a total beginner at this. At the moment ...
1
vote
1answer
42 views

Kill process on specific port

It has been asked before but how to do it with OpenBSD? I tried some different method but none worked. $ sudo fuser -k 80/tcp fuser: 80/tcp: No such file or directory $ kill $(sudo lsof -t -i:80) ...
0
votes
1answer
25 views

Can't find logical fault in script which should execute a tcpdump

I have written a script which compares the time and if it is the same start time like the current time and not like the end time it starts a tcpdump. And If the end time is like the current time it ...
1
vote
3answers
124 views

How to kill a command executed from a script?

I would like to start a tcpdump in my own script an after some time I would like to kill it again. How can I access the PID from the tcpdump. I tried it with $$ , but this only kills the script. if ...
2
votes
2answers
61 views

How to kill line of PID?

I have process which created multiple PID's. I want to kill all those PID's. I have tried pkill <process_name>. But PID not getting killed as they were wait to resource releasing. I have ...
1
vote
2answers
43 views

Is it possible to kill another user's process using sudo privileges?

I have sudo privileges on my home desktop running Fedora 22. I created a newuser with sudo useradd newuser and sudo passwd newuser. I then logged in as this newuser with su newuser, then switched back ...
0
votes
2answers
58 views

Creating an automated idle process kill script

I would like to implement a solution to a specific instance of the generic problem wherein idle users tie up resources. I know the user list can be retrieved with 'w', the associated PID with 'ps', ...
0
votes
1answer
36 views

pkill in a script

I am trying to kill a process by his name in a script. Process : toto 15408 1 0 Nov13 ? 00:20:36 java -Xmx512m -XX:MaxPermSize=128m -cp /local/toto//conf/:/local/toto//lib/* ...
2
votes
2answers
103 views

umount stalled and unable to kill its process

Sometimes when I remove SD card I can notice that when I reinsert it - it doesn't mount by itself. Also I've notice that umount process is stalled and I cannot kill it (not even with -9). I use ...
3
votes
1answer
58 views

Why does kill not work from script, but does work from terminal?

I have the following contrived script to illustrate my issue: #!/bin/bash set -eux sudo sleep 120 & spid=$! sleep 1 sudo kill $spid wait $! This will print $ ./test.sh + spid=21931 + sleep 1 ...
0
votes
0answers
21 views

Suspend using systemctl's hibernation scripts

The man page (or something similar, can't remember) of systemctl says tells us that we can put user-defined scripts into the system-sleep directory. All scripts in there will be executed before any ...
1
vote
1answer
100 views

How can I kill a program started from rc.local when Ctrl-C doesn't work?

I was trying to create a program that runs at start-up that takes a picture every 10 seconds (In a infinite loop) on my raspberry pi but I discovered I had made a mistake but couldn't Ctrl+C out of ...
2
votes
2answers
36 views

Can a tty be made unkillable?

I used PuTTY to ssh into a linux machine from a windows machine and I was just messing about with the pkill command. I quickly found out that I could log out of a remote session by typing w to show ...
2
votes
1answer
26 views

How does kill by pgid affect new subprocesses?

I have a very complicated application, which has its init-script and main service runs as a daemon. I want to stop it fast and gracefully, so I used this in stop() function: group_id=$(ps -o pgid= ...
2
votes
3answers
59 views

How to make init script print “OK” only when all subprocesses are stopped?

I have a very complex python application. It has it's own init script, but when I execute: sudo service my_service_daemon stop It prints "Stopping my_service_daemon [OK]", but in real ...
1
vote
1answer
140 views

AIX and oracle: aioserver process won't die

When shutdown an oracle server I see this error message at exit umount /oracle/ umount: error unmounting /dev/oracle: Device busy lsof and fuser report nothing but ps aux|grep oracle report this ...
1
vote
0answers
47 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 ...
1
vote
1answer
35 views

How do I know which Mosh Client I am?

When I try who, I frequently see output such as this: username pts/0 2015-10-09 04:48 (mosh [2680]) username pts/2 2015-10-12 00:04 (75.139.11.119 via mosh [12364]) username pts/6 ...
1
vote
1answer
79 views

pkill with regex

I have few java processes running like below, java -jar /my/path/to/app/myapp.jar java -jar /my/path/to/app/prodapp.jar java -jar /my/path/to/app/testapp.jar java -jar ...
0
votes
1answer
142 views

ps finds process, kill doesn't [duplicate]

Specifications [midas@localhost ~]$ uname -a Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and [midas@localhost ~]$ cat ...
2
votes
1answer
50 views

Trying to Write a Script to Kill Processes based on niceness

I am trying to write a script in bash that will kill any of my own processes (and run indefinitely) if those processes have a niceness value of 4 or lower. Can anyone tell me what might be wrong? ...
1
vote
1answer
92 views

Unable to kill process, even with root. How to diagnose?

There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor. I tried killing them as below, but they remain as it ...
1
vote
1answer
44 views

List of killed apps

Is there a command to list latest killed processes? Or to search through log file for killed app, for example called "my_app"?
11
votes
3answers
2k views

Make a process unkillable on Linux

I'm working on a password manager application, and for security reasons I want to launch an unkillable process. And besides I don't want this program to be a daemon since I need to read from standard ...
0
votes
0answers
63 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 ...
0
votes
1answer
134 views

I cannot kill crond - trying to stop cron service

This is frustrating, I try: service crond status And get this: Redirecting to /bin/systemctl status crond.service crond.service - Command Scheduler Loaded: loaded ...
8
votes
2answers
529 views

Kill a suspended process?

I was slightly confused by: % vim tmp zsh: suspended vim tmp % kill %1 % jobs [1] + suspended vim tmp % kill -SIGINT %1 % jobs [1] + suspended vim tmp % kill -INT %1 % jobs [1] + suspended ...
0
votes
3answers
92 views

Killing a comet zombie

I have a zombie process that is changing its PID, which is increasing. Is it possible to kill a process with PID greater than N?
1
vote
1answer
93 views

Killing PGIDs but proceses are respawning, how do I make it persistent?

I ran ps aux --forest -j to see parent and child processes. Here is an example: root 3744 3744 3744 0.0 0.2 77084 4160 ? Ss 09:34 0:00 /usr/sbin/cupsd -f lp 3747 3747 ...
1
vote
1answer
72 views

Why kill -9 -1 doesn't work?

From man kill: kill -9 -1       Kill all processes you can kill. But when I do sudo /bin/kill -9 -1 nothing happens. My uname -a for info: Linux michal-Q530 ...
0
votes
0answers
49 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 ...
3
votes
1answer
121 views

How to kill a task that cannot be killed (uninterruptable?)

I have a task running that blocks pm-hibernate (on Linux 4.0.7-2). When I try pm-hibernate there is an error message "Freezing of tasks failed after 20.002 seconds (1 tasks refusing to freeze, ...
2
votes
2answers
109 views

How do I kill a process after detaching it from bash?

I have multiple scripts that detach a process from bash using nohup and &>/dev/null &. My question is, how do I kill the process after completely detaching it from bash. using killall or ...