Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
22 views

what is the right way to know all script PIDS that runs under folder

Under the folder /home/testing/scripts on a Linux machine, we have 234 different scripts that do sanity and testing as /home/testing/scripts/test.network.py /home/testing/scripts/test.hw.py /home/...
0
votes
2answers
22 views

Can't kill stopped jobs with bash script

for i in $( seq 1 $1 ) do kill %$i done I try to kill the stopped jobs with this script, but interestingly it can't be able to even though i have jobs open. Here is the screenshot related to ...
1
vote
2answers
121 views

Can't kill wget process with `kill -9`

I have a wget process that I am unable to kill. This question is similar as one asked before, but here the D in the STAT column seems to indicate that it is in uninterruptible sleep (usually IO), ...
0
votes
1answer
28 views

why crtl-C or ctrl-Z is not working in this program?

during this process is running i am trying to stop it by Ctrl+C or Ctrl+Z but any of this is not working. #include <stdio.h> void main(void) { process(); } void process(void) { ...
5
votes
3answers
842 views

Is there a clean way to `sudo pkill` processes without including the `sudo` process?

I need to kill some processes that are run as sudo, matching them by full name, and count the number of original command invocations. For each process there are two processes: the command itself, and ...
2
votes
0answers
32 views

How do I send signal to all processes in a cgroup?

kill $(< /sys/fs/cgroup/freezer/<name>/tasks ) works, but looks clumsy, produces a warning if cgroup is empty and may hit command line length limit. pkill -F does not accept cgroup tasks file ...
0
votes
1answer
27 views

“bash script.sh” vs “sh script.sh” w.r.t kill command - where sh is symlinked to bash

What's the difference in running the bash interpreter using the bash command itself vs sh command, where sh is also a symlink to bash? The main difference I found is that, kill command behaves ...
0
votes
0answers
22 views

Why does terminal turn red after closing X?

My terminal's background turns red after force closing X. Why?
0
votes
1answer
63 views

Did I kill my machine?

I accidentally ran a malicious script. The script was for i in {1..10000} do sudo kill -9 $i done Did I destroy my machine?
0
votes
1answer
32 views

Make API requests recursively without large number of processes running

I have the following Script File 'bored.sh'. This file recursively calls itself. curl "https://www.boredapi.com/api/activity" >>./bored.json sleep 1s bash ./bored.sh I realized that ...
1
vote
0answers
27 views

Can't kill process .gytm

Using Centos 7 I have a problem with a process that cannot be killed. When I run htop, it appears as "/usr/sbin/cloud-agent -k start" and when I run top the process is: .gytm When I kill ...
0
votes
1answer
42 views

Print to stdout process ids that were killed

Using the kill command, is there a way to print to stdout the process ids of the background processes being killed? After searching via Google, there seems to be (on some Unix or Linux) a --verbose ...
0
votes
2answers
22 views

Process with dynamic id won't kill; has no parent

I am trying to kill process like this: root@xxx:~# ps -ef | grep mosquitto root 3083 1912 0 11:59 pts/0 00:00:00 grep --color=auto mosquitto root@xxx:~# kill 3083 -bash: kill: (3083) - ...
2
votes
1answer
53 views

PID of background function “$!” gives wrong value

I am trying to capture the PID of a function executed in the background, but I seem to get the wrong number. See the following script: $ cat test1.sh #!/bin/bash set -x child() { echo "...
1
vote
1answer
36 views

How does one kill jobs submitted via bg in one subshell from another shell instance?

Suppose, as a dummy example, I execute a bash command in one terminal tab: $: sleep 1000 & Then, in another tab, I run the command that should "kill all background jobs": $: jobs -p | ...
0
votes
0answers
26 views

Is there a way to configure the Linux OOM killer to kill the parent instead of child process?

Is there a way to configure the Linux OOM killer to kill the parent instead of child process? When the child process is killed that parent keeps running in a bad state. I can detect if the child was ...
0
votes
0answers
25 views

kill can't kill background process in script

For a reason sudo pkill $(jobs -p 1) can't kill the process but sudo pkill works outside the script #!/bin/bash pipe=/tmp/outpipe_vpn mkfifo $pipe ##random command to enter sudo password sudo echo ...
2
votes
2answers
96 views

How to kill a command run from a script after a period? [duplicate]

I would like to run a never-ending command (such as play a mp3 file in loop) for a period of length T. I put the command in a shell script my.sh: #! /bin/bash vlc /path/to/my.mp3 # will play the file ...
0
votes
0answers
95 views

killall and kill doesnt work

I scanned using ClamAV and found these files: [root@ip-172-31-23-37 ~]# sudo clamscan --infected --recursive --exclude-dir="^/sys" / /tmp/.X25-unix/dota3.tar.gz: Multios.Coinminer.Miner-...
0
votes
0answers
31 views

Process automatically starting on a port in ubuntu 18.04

I have encountered a very weird situation. I am using below command to list all processes running on a particular port 3001: sudo lsof -n -i :3001 Only one process is printed each time and I kill ...
0
votes
0answers
20 views

extracting column value from a command [duplicate]

I've multiple process of xargs running. I want to terminate them all using kill at once . How to do them ? . So far I've tried this ps -a | grep -i xargs | awk '{print $1}' | xargs kill .
0
votes
1answer
17 views

Kill only one Java process by grep

I want to kill this process: root 11870 30.1 21.9 2358848 220980 pts/0 Tl 07:51 0:24 java -jar /opt/bonansa/bonansa.jar If I do : root@localhost:/usr/local/bin# ps -A |grep java 11870 ...
-2
votes
1answer
29 views

Unable to kill a process that shows up on ps aux

I am unable to close WinZip. My command is shown below. Note that I don't think it is what is called a zombie program because according to this website, when I tried to find zombie program by typing ...
2
votes
1answer
48 views

How to kill MY OWN idle ssh sessions

I have a few idle ssh sessions that I want to kill. This remote server is used by many users, how do I identify the pids of the sessions that I own? When I run who, I get a list of ssh sessions ...
0
votes
1answer
184 views

Why does SIGINT not terminate a stopped process?

According to the POSIX standard regarding signals (see "Standard signals" section), both SIGKILL and SIGINT have as default action Term. However, this seems not to be the case when the ...
0
votes
2answers
342 views

Podman can not kill containers: not running, but state improper

When I run podman container kill -a, I get can only kill running containers. 11d887d57069b3ee630fd6f1b13d600485c34f5020ff09fec65f4e31dd7242a5 is in state configured: container state improper can only ...
1
vote
1answer
62 views

Why doesn't kill -s<number> work anymore?

For the longest time, I would run kill -s9 to send SIGKILL to the process, now it seems it doesn't work on Debian Testing, $ kill -s 9 988224 kill: unknown signal: SIG9 kill: type kill -l for a list ...
0
votes
0answers
15 views

How to enable process killing when getting fully out of memory

I have MX Linux 19.2 (Debian 10 with SysVinit) — Linux Kernel 5.4.0-17.1-liquorix-amd64 I have only 4 GB RAM, and when I'm using Firefox with other applications for a long time, I sometimes get my ...
0
votes
1answer
52 views

How to kill the PID of service that configured as Restart=always

Dear friends and colleges , We have service under /etc/systemd/system Service name is calc_live_servers.service Since Restart=always is configured in calc_live_servers.service Then when we kill ...
0
votes
2answers
155 views

Difference between kill <pid> and kill -s TERM <pid>

What exactly is the difference between kill <pid> and kill -s TERM <pid>. Initially i thought the $TERM variable holds a signal number but when I echo TERM its gives me $echo $TERM xterm-...
1
vote
1answer
37 views

Why if I change the name of procps's kill command (mv /usr/bin/kill /usr/bin/anotherkill) in Ubuntu 20.04, it stops working?

For instance, if I run anotherkill -s 9 1234, I get this error message: skill: "anotherkill" is not supported For more details see skill(1). Above referenced man page doesn't help, however. ...
0
votes
1answer
110 views

How to pgrep to find a bash script on macOS (or how to programatically kill a script running in the background)?

I'm trying to programatically kill a bash script running as a background process (on macOS). The way I've settled on for now is to pgrep the name of the script and then pass the PID value to a kill ...
0
votes
1answer
51 views

Kill all processes that are using qt5

I would like to run a pyhton script with conflicts with the use of a certain graphical framework: ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'qt5' is ...
1
vote
3answers
256 views

If I run tmux and then `kill` the tmux process, I see two bash processes. How does this second bash relate to the first and how do I kill it?

As stated in the question, I'm trying to better understand sessions, processes, process groups, etc. A few questions that I came across while playing around with tmux. If I open tmux and run ps, I ...
2
votes
1answer
49 views

Why is the wait $pid command interrupted by any signal to the waiting process?

I can't find any documentation that explains my observations in sufficiently enough terms. After I run the below code, I perform a kill -SIGINT $my_pid from a different shell. I will correctly see ####...
0
votes
1answer
92 views

how to kill processes in shared host by automatically?

in shared hosting which allows maximum 25 processes. as it reaches 25 processes , site goes to 500 internal error. in cpanel i manually kill the process one by one . Which script can work to kill all ...
0
votes
0answers
52 views

how to kill PHP PID processes?

i have shared hosting which allows maximum 25 processes. after it reaches 25, site shows 500 internal error. in cpanel i manually kill the process. Which script can work to kill all php PID processes ...
0
votes
1answer
108 views

kill -9 $PPID kills the process?

I read that killing the parent process will get the child process attached to init (PPID=1). To test this I created three shells and sent the second one the kill signal: # first process "a" ...
0
votes
1answer
689 views

How to kill all (child) processes in the process tree rooted at a specific process, but not the process itself?

I have a python process, which spawns a git (git clone) child process, which in turn spawns several child processes itself. Here, I want to kill all processes in the process tree rooted by git, ...
1
vote
0answers
50 views

Get cursor back after killing xkill

Assume that you accidentally typed xkill on a terminal and you killed by Ctrl+Z or Ctrl+X. Now the cursor is an X and it doesn't really function. How can I get the cursor back without rebooting the PC?...
1
vote
0answers
140 views

Send SIGINT to a command launched inside bash script

I am executing a bash script and I want to correctly terminate a command (by pressing CTRL+C) that I am launching inside the script. This is the script: trap ctrl_c SIGINT function ctrl_c() { PID = $!...
0
votes
0answers
322 views

How can I make a terminated process terminate all of its children recursively using multiprocessing.Process in Python3?

I want to spawn child processes inside child processes, and make it so, that if a parent is terminated, then each of its children is terminated recursively. I'm currently using Python as the ...
2
votes
2answers
250 views

How do I kill a process by the title?

On Windows, this kills any process with "This is a process title" as the title. taskkill /FI "WINDOWTITLE eq This is a process title" I've searched all over without finding a ...
0
votes
1answer
27 views

Kill a child shell process but send 0 response code to parent

Looking into one python project which is created to setup one very large remote cluster for enterprise (currently no resume/idempotent capability is supported). While running python script if at any ...
3
votes
4answers
225 views

How to avoid killing a wrong process when using PID number for killing?

I do start a long-running background process within a Bash script. I save the PID number inside a variable after sending the process to background and I use that PID number to kill that process when ...
0
votes
0answers
7 views

Kill background process bash not working from current shell [duplicate]

I'm doing trap to kill subprocesses of script and it's working perfectly: myscript.sh trap "kill 0" EXIT ./someProcessA & ./someProcessB & the problem that I don't understand why ...
0
votes
0answers
52 views

Why bash need job control?

Why Unix systems need job control? So for example, we can use the process number or job number(jobspec) with the kill command. $ sleep 101 & [1] 19 $ sleep 102 & [2] 20 $ jobs -l [1]- 19 ...
1
vote
2answers
60 views

How to terminate a piped command?

Let's say there is a simple script named action.sh: #!/bin/bash echo -n 'a' | nc a.b.c.d p action.sh here puts an a character to a.b.c.d address. However, nc can hang sometimes, and I want to kill it:...
0
votes
1answer
39 views

Can't stop script l loop with exit command

I've got a debug function in my script (that runs via nemo.action) that uses zenith popup to ask if the user want to stop or continue when an error occurs. However, when this happens inside a loop, ...
0
votes
0answers
294 views

How to kill a Python process within an SSH session

This question involves running a bash script, say helloworld.sh, which executes an MPI mpirun command which in turn runs a Python program, say helloworld.py, using mpi4py. The bash command is used in ...

1
2 3 4 5
13