Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
18 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
50 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
34 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
24 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
22 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 ...
1
vote
2answers
85 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
66 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
16 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
19 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
15 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
28 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
32 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
106 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
1answer
173 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
55 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
14 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
29 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
144 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
33 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
82 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
48 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
153 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
42 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
50 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
35 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
71 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
346 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
41 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
90 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
115 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 ...
1
vote
2answers
160 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
24 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
181 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
51 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
56 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
37 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
194 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 ...
0
votes
1answer
41 views

Automatic Process kill process problem

I am using MX linux for a few days and I found a problematic behavior. Suddenly sevaral processes were killed automatically. For this, I had to face many problems. Is there any way to stop it? I don't ...
0
votes
0answers
186 views

Cannot kill process nomachine nxnode.bin

Almost every time, when I resume system from sleep mode, after login again with nomachine (remote desktop) I have: process nxnode.bin with R (realtime?) and 100% CPU usage. This makes impossible ...
0
votes
1answer
35 views

Why is a process being shown while using “jobs” command after killing the process manually?

Why is the parole(just a media palyer) still listed in the "JOBS" command output even after killing maually and why is not listed in the "PS" command output ? Does this mean the ...
4
votes
1answer
110 views

kill %1 equivalent in fish

In bash, if I run kill %1, it kills a backgrounded command in the current shell (the most recent one, I believe). Is there an equivalent of this in fish? I haven't been able to find it online in a bit ...
0
votes
0answers
25 views

Killed tmux pane continue running foreground script

A little curiosity. A vanilla tmux session (stock config) had 1 pane. The pane was executing the following command: sleep 1d; shutdown -h now. 1h into the execution of the "sleep" command, ...
1
vote
0answers
93 views

Running script on .xprofile fails to execute

I'm trying to run a login script executing a desktop audio visualizer (glava) on .xprofile but I am running to a few problems: First of all the script (on ~/.local/bin/glav): #! /bin/sh nohup glava --...
-1
votes
1answer
35 views

Why does the shell not terminate by kill -s TERM?

#!/bin/sh trap 'trap - EXIT; echo exit' EXIT trap 'echo term; exit' TERM sleep 100 If I run kill for the PID of the shell process of the script, it does not terminate. If I remove the TERM trap, ...
0
votes
1answer
30 views

Why do certain processes keep jumping to higher PIDs?

Sometimes when my vscode hangs up, and I have to force-quit it, it is as though it will not start back up again until I restart my computer. Before shutting the computer down I tried looking for its ...
0
votes
0answers
110 views

How to get cron to pkill my java process?

I have a cron job that runs to detect if a certain application has frozen. If so it should kill the frozen application and restart it. The application is a Java program. When the application is frozen,...
1
vote
1answer
32 views

When using kill -CONT, where will the process pick back up?

I'm planning on using to kill -SIGSTOP and kill -CONT to pause data collection over a given time frame. I'm wondering if when I invoke kill -CONT, will the data collection start from when I stopped ...
1
vote
1answer
100 views

Cannot kill children on trap

I am stuck with something unexpected to me: I am trying to make a chat script and set to call function on 'Ctrl+Z' trap 'chat_unloop' 20 But in the code I have some rows that starts child ...
3
votes
0answers
1k views

OS linux ubuntu is killing my mongod service

I am facing this issue consistently, whenever I run some CPU and memory intensive processes so OS kills my mongod service. Due to which service goes into the failed state and everything stops. ...

1
2 3 4 5
12