Questions tagged [kill]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
71 views

How can I change the name an executable presents itself to the system

Forgot to mention, running on Suse Tumbleweed, Desktop is KDE Plasma. I have in my bin directory a symbolic link to mpv, $ ls -l bin/Play lrwxrwxrwx 1 boffi users 12 Feb 11 12:33 bin/Play -> /usr/...
gboffi's user avatar
  • 1,362
0 votes
0 answers
17 views

Zenity --auto-kill is not working on a ghostscript process

I'm with a problem with the --auto-kill zenity option, which function is, according to zenity --help-progress, used to kill parent process if Cancel button is pressed. That's what I need in this line: ...
samueldelorenzi's user avatar
0 votes
1 answer
22 views

When does a hup signal affect the parent process? [duplicate]

If I run ./script.sh &, where script is the following: #!/bin/bash echo "hello" sleep 30 echo "hello again" sleep 30 touch /root/foo.txt Then I use ps au, to identify the &...
Thomas Stokes's user avatar
1 vote
3 answers
123 views

start multiple terminal windows in a "process group" so that remaining processes can be killed, if any one of the processes terminates

I have a script which starts 3 terminal emulator windows: #!/bin/sh terminator --role='terminator-left' 2>/dev/null & sleep 0.1 terminator --role='terminator-center' 2>/dev/null & sleep ...
Martin Vegter's user avatar
0 votes
0 answers
29 views

How do I read Cygwin's `/bin/kill` man page without bash's `kill` builtin interfering?

I'm using Cygwin on Windows 10 but I also use Ubuntu with WSL2. I can't reproduce this with the latter. When I type man kill in cygwin, it says No manual entry for kill. When I type man /bin/kill, it ...
Daniel Kaplan's user avatar
0 votes
0 answers
56 views

How is the order of processes killed in cgroup v2 when out-of-memory?

I'm using cgroup v2 on Ubuntu 22.04 to limits users in a group. I'm wondering how the processes are killed when out-of-memory (OOM). For an instance: The computer has 100G memory. I have a group of 4 ...
hffqyd's user avatar
  • 1
4 votes
0 answers
45 views

Perl's `kill` is using `$! == Errno::EINTR` unexpectedly

I wrote a network daemon that forks off children to handle TCP connections. On SIGINT the main process triggers a kill for each child in order to clean up and to collect some final statistics. In ...
U. Windl's user avatar
  • 1,387
7 votes
0 answers
151 views

Why does `kill -0` return success on a non-existent process?

I'm on Ubuntu 22.04.3 LTS, (Jammy Jellyfish). $ ps -p 1635 PID TTY TIME CMD $ kill -0 1635 ; echo $? 0 $ type kill kill is a shell builtin $ echo $BASH_VERSION 5.1.16(1)-release $ mount|...
Philippe's user avatar
  • 1,425
0 votes
0 answers
27 views

linux: kill -9 process success only on second attempt

I'm currently solving umount /chrootedpath /dev/pts after several chroot(s): target is busy. I've found part of the problem - two processes still running ps had shown as sudo choot command. They were ...
Alex Martian's user avatar
  • 1,005
1 vote
1 answer
35 views

Background process is not being terminated by SIGINT when executed via ssh

I was experimenting with ssh, nohup, bg etc. I started a tail process in remote using $ ssh remotehost '{ nohup tail -f ut.log &> /dev/null < /dev/null &} && echo $!' It ...
Sourav Kannantha B's user avatar
2 votes
1 answer
293 views

I wish to kill a service with a "sytemctl kill logstash.service" but SIGTERM is received by the service, instead of a SIGKILL. How do I send SIGKILL?

A new logstash version I'm using can't stop, attempting to connect to Elastic all the time, while it can't (an authentication trouble, I will resolve later). a sudo systemctl stop logstash.service isn'...
Marc Le Bihan's user avatar
0 votes
0 answers
148 views

Trapping SIGTERM and restarting a script works exactly three times on macOS

I have a setup of two bash scripts, one starting a node server (start-server.sh) and one that runs the first script and reruns it whenever it gets terminated via SIGTERM (start.sh). start.sh looks ...
linusha's user avatar
0 votes
0 answers
87 views

A process using CUDA gets stuck, then all others get stuck as well - what do I do?

I’m writing some program using CUDA CUDA 12.1, running on a Linux system (Devuan Daedalus, kernel version 6.1.27). For some reason (which may be a bug of mine, although I kind of doubt it) - the ...
einpoklum's user avatar
  • 9,462
2 votes
1 answer
232 views

Processes in uninterruptible sleep when the server is not responding

I'm using sshfs to mount and interact with directories and files located on a remote server. The command I'm using is: sshfs -o follow_symlinks host:dir mountpoint -o reconnect Sometimes, after a ...
TVG's user avatar
  • 143
-2 votes
1 answer
220 views

killed a process, it comes back

I have some process running >ps | grep camera 2345 root 3.08 someprocess camera.json I am trying to kill it but neither kill 2345 kill -9 2345 work. The process comes back to life under a ...
KansaiRobot's user avatar
0 votes
0 answers
115 views

Programs using CUDA freeze after one of them fails, can't be killed

I'm trying to debug a certain program of mine which uses CUDA (specifically, CUDA graphs). This program (sometimes) triggers an error, then dies - relatively gracefully. However, after it has failed, ...
einpoklum's user avatar
  • 9,462
22 votes
6 answers
3k views

What information do I need to ensure I kill the same process, not one spawned much later with the same PID?

I have a bunch of commands that I start with a start.sh script, storing their PID. Then later, I want to stop them with a stop.sh run at the user's convenience. Watch the trap: I run start.sh today, ...
Marc Le Bihan's user avatar
1 vote
0 answers
172 views

Using the fuser command to kill processes using a mount point is taking a long time

I am trying to kill processes with open file handles on a mount point before performing unmount. We observed for a few mount points, the below fuser command is taking a long time. It took more than 3 ...
Bharath's user avatar
  • 11
1 vote
1 answer
51 views

How to kill known running pids if one of the pids terminated?

I have this script.sh where I pass the path to the binaries, all apps run in the background: ./script.sh path/to/app_1 path/to/app_2 ... path/to/app_n Here is the script: #!/bin/bash for app in &...
a.wise's user avatar
  • 15
0 votes
0 answers
34 views

How to fully remove partition made by local host remove host and all that had been put on drive? Hacked my Mac. Need help asap I

So I opened my Mac and noticed a random guests account made due to my kids father previously hacking an older laptop and it not being usable I knew immediately to check logs. After some digging I came ...
Marie allen's user avatar
-2 votes
1 answer
827 views

Firefox freezes, can't be killed, and Debian 11 XFCE can't be shut down

Problem: (has been happening every day, at least once, but commonly many times) I have a Debian GNU/Linux 11 (bullseye) system where Firefox 102.9.0esr (64-bit) has been randomly freezing and needing ...
BsAxUbx5KoQDEpCAqSffwGy554PSah's user avatar
0 votes
0 answers
178 views

Gracefully quit "Install macOS Ventura.app" with Terminal

I have a script I would like to deploy to Mac endpoints which would quit the "Install macOS Ventura" installer app if it's open. I'm using the kill -9 <PID> command, and it doesn't ...
maconfire's user avatar
0 votes
0 answers
216 views

how to kill java process forcefully and remove directory which is used by that process

I have one use case where I am killing a java process with pkill java, and after that, I want to remove certain directories. I have used rm -rf /pathtofolder but it gives: rm: cannot remove '/...
Samurai's user avatar
  • 55
0 votes
1 answer
433 views

Systemd delaying restart of a failed service, appears to add a 30 sleep

(Originally posted this on stackoverflow but was asked to move it here.) I have a python daemon running as a service, sometimes several of them are running for different processes (p0, p1, etc.) that ...
Dave's user avatar
  • 103
0 votes
2 answers
502 views

Can't Ctrl-C a script after controlling it from another terminal

I'm running blah.sh in one terminal. Then in another terminal, I'm running a script that suspends and later continues blah.sh: ... script_id=`pidof -x blah.sh` kill -s SIGSTOP $script_id ... ...
Adam M's user avatar
  • 1
1 vote
0 answers
1k views

Python process has 100% CPU usage and can't be stopped

I have a python process running on a CentOS machine. I the process is running with 100% CPU usage and status 'R'. I tried to kill it with kill -9 PID but it didn't work. How can I kill the process?
Hadar Shavit's user avatar
1 vote
2 answers
184 views

Kill all processes macthing a pattern, ignoring case

I want to have an alias to do something like pkill -f PATTERN but ignoring the case of the pattern. This is what I have after looking around but it's not working alias pkf="kill `ps ax | grep -i $...
user avatar
1 vote
0 answers
819 views

How can I kill a process in Linux when kill -9 fails?

I have a process (actually a pair of them) numbered 1234 which uses my NVIDIA GPUs. I want to kill it. I tried kill 1234; I tried kill -9 1234 I tried kill -KILL 1234 - no effect. Tried Ctrl+C and ...
einpoklum's user avatar
  • 9,462
1 vote
0 answers
439 views

How long can kill -9 take

I am writing a custom process manager, that executes commands and monitors their execution. On their termination sometimes I want to terminate some running processes and execute other processes. I ...
debnatkh's user avatar
0 votes
1 answer
92 views

mpirun kill parallel processes when lose internet connection ssh

When I'm connected via ssh and are parallel processes running and it loses the internet connection all parallel processes. When I reconnect I find the following message in log file: -------------------...
gvd's user avatar
  • 111
1 vote
1 answer
776 views

Difference between kill -9 and -19?

I normally use kill command to kill processes. Sometimes it's not killed only with kill command. Then I use -9 option. I've checked the man page of kill command. $ kill -l 1) SIGHUP 2) SIGINT 3) ...
Hardguy's user avatar
  • 59
0 votes
2 answers
416 views

Using -exec with kill command

I am trying to execute the following command in which I use the kill and exec commands. kill -l -exec grep -i 'term' {} + Since, kill -l returns a list of all kill signals, I want to find all those ...
MathMan's user avatar
  • 181
1 vote
2 answers
586 views

Killing multiple process by process name using shell script

I am having a shell script, which will start processes and kills the process. It is accepting the processes names as arguments. Need to find the pid and kill those. Initially, it was like for procname ...
Shashank Gb's user avatar
2 votes
2 answers
2k views

How to kill watchdog Daemon on Linux

I configured my watchdog.conf, and i want try if my computer restart when it crash. so, I wanted kill my Watchdog to try if my computer will restart. But I try to killed it with the command "...
Zapsalis's user avatar
0 votes
0 answers
94 views

ps | grep returns two PIDs [duplicate]

I am trying to write an init.d script, I am trying to kill a named node process: kill $(ps aux | grep 'eproxy' | awk '{print $2}') The problem is, when running just the ps command on it's own, I am ...
JLCarveth's user avatar
1 vote
0 answers
220 views

Process makes other processes hang

At some point, a number of scripts seemed to hang for no apparent reason. Running them manually still worked. I narrowed it down to a ps -ef that hanged. After a number of processes, output just ...
Ljm Dullaart's user avatar
  • 4,435
0 votes
2 answers
878 views

When is mandatory send SIGINT programmatically?

I know the recommendable way to terminate a foreground process is through the SIGTERM signal, it because it gives the opportunity to the process itself to clean/release resources. This signal only can ...
Manuel Jordan's user avatar
7 votes
1 answer
879 views

What is correct or suggested approach to send the signal name through 'kill' command?

I read many tutorials about the use of kill command, mostly 3 approaches kill -15 <pid> kill -SIGTERM <pid> kill -TERM <pid> For scripts purposes and for portability with macos too, ...
Manuel Jordan's user avatar
4 votes
3 answers
2k views

Why are the signal lists for kill, killall and pkill not the same?

I researched the kill, pkill and killall commands, and I understood most of their differences. However, I am confused about their signals: If I run kill -l, I see: 1) SIGHUP 2) SIGINT 3) ...
Manuel Jordan's user avatar
5 votes
0 answers
330 views

Why does ps not exit when listing full command line arguments? [duplicate]

Any time I attempt to run the ps command or another similar command in a way that would make it output the arguments for any process, the command runs and produces output, but then freezes, entering ...
AJMansfield's user avatar
0 votes
2 answers
824 views

Bash script with while loop that waits for a file to be refreshed but kills if time threshold is exceeded

I am very basic with bash so apologies if this is obvious to solve and please let me know if more details are needed. The script below is part of a larger script to launch a python workflow and wait ...
Taycano's user avatar
2 votes
1 answer
513 views

Resume killed job

I accidentally closed a terminal window where I had limited the cpu usage of a parallel job. Now, if I ps -e S in a new terminal window, I can see that job as: 311029 pts/0 TN+ 275:25 jobname Is ...
Py-ser's user avatar
  • 359
2 votes
1 answer
412 views

How do I disable csd-wacom?

I would also like to know how to permanently disable csd-wacom since I don't have a Wacom tablet and csd-wacom is wasting resources and the question regarding how to disable it wasn't answered.
Nunya Bizness's user avatar
2 votes
1 answer
117 views

How do I stop xclock restarting at every system startup

I use Linux Mint on one of my machines. The other day I tried xclock via Terminal command line. I then found I couldn't stop, end or kill it. Or rather I could kill it but it immediately restarted. ...
PotatoCrisp's user avatar
-2 votes
2 answers
123 views

how to kill huge process by killing the daemon itself

on our rhel machine we saw huge lines as ( total lines numbers are 856 ) that cause very high cpu load average root 110490 108840 0 07:32 ? 00:00:00 /usr/bin/python /var/tmp/get_params/...
yael's user avatar
  • 13.1k
3 votes
3 answers
811 views

Use xargs and kill in script with optional signal

A script for terminating a server on a certain port: #!/bin/bash PORT="$1" SIGNAL="$2" if [ "${SIGNAL}" != "" ]; then SIGNAL=" -${SIGNAL}"; fi lsof ...
lonix's user avatar
  • 1,723
2 votes
2 answers
634 views

killall firefox does not kill firefox

When I had loads of firefox windows open and wanted to close them quickly I did killall firefox using killall from the psmisc package in Ubuntu. Nothing happened. I looked in the list of my processes ...
alle_meije's user avatar
33 votes
5 answers
10k views

Ctrl+Alt+Del equivalent on Linux? [duplicate]

I foolishly started a job that turned out to be so big and busy that it froze everything. I wish I could type a kill command or use xkill, but the system is unresponsive, apart from the audible ...
Michael's user avatar
  • 755
0 votes
1 answer
302 views

why when hooking syscalls from the kernel, is the pid of kill, zsh, but the pid of mkdir is mkdir?

I am writing my own rootkit to learn about Linux kernels. I wanted to hook into a syscall and alter the credentials of the current task to be that of roots (i.e.euid=0). I saw you could do this with ...
sys_overflow's user avatar
0 votes
1 answer
468 views

Why can't I kill this process with a negative number?

I want only one instance of my shell script to run at once, with new ones killing old ones. I'm on Linux, and thought this was a good approach: # Terminate other instances by name and name self. kill -...
sedwho's user avatar
  • 5

1
2 3 4 5
14