Kill is an operation of removing an object or process from memory so that other processes/variables can use them.
Questions tagged [kill]
1603 questions
23
votes
8 answers
kill a process started with popen
After opening a pipe to a process with popen, is there a way to kill the process that has been started? (Using pclose is not what I want because that will wait for the process to finish, but I need to kill it.)

Sophie Alpert
- 139,698
- 36
- 220
- 238
23
votes
5 answers
When a parent process is killed by "kill -9", will subprocess also be killed?
One of my colleague told me this morning, when he killed supervisord by "kill -9", the subprocesses of supervisord is not killed.
He is quite sure about that, but I tried many times and did not find that happen.
So when a parent process is killed…

faceclean
- 3,781
- 8
- 39
- 58
22
votes
2 answers
Detect when console application is closing/killed?
I wanted to make a safe exit for my console application that will be running on linux using mono but I can't find a solution to detect wether a signal was sent to it or the user pressed ctrl+c.
On windows there is the kernel function…

Prix
- 19,417
- 15
- 73
- 132
22
votes
3 answers
How to kill a child thread with Ctrl+C?
I would like to stop the execution of a process with Ctrl+C in Python. But I have read somewhere that KeyboardInterrupt exceptions are only raised in the main thread. I have also read that the main thread is blocked while the child thread executes.…

Amit S
- 1,053
- 2
- 9
- 18
22
votes
5 answers
kill iOS Simulator from terminal
I'm trying to terminate the iOS Simulator from the terminal console (needed for integrating automatic UI Testing in Jenkins),but every time I try the command:
killall SimulatorBridge
a prompt waiting for action gets displayed:
The problem is that…

Claus
- 5,662
- 10
- 77
- 118
21
votes
6 answers
Kill or terminate subprocess when timeout?
I would like to repeatedly execute a subprocess as fast as possible. However, sometimes the process will take too long, so I want to kill it.
I use signal.signal(...) like below:
ppid=pipeexe.pid
signal.signal(signal.SIGALRM,…

user504909
- 9,119
- 12
- 60
- 109
21
votes
6 answers
How can I prevent my Android app/service from being "killed" from a task manager?
It is very important that my service stay running until someone with a password stops the service from my UI screen. My app runs great but it is designed to be turned on/off by parents (with a password) on their kids phones. I have managed to make…

Don
- 211
- 1
- 2
- 3
21
votes
4 answers
How to propagate a signal through a collection of scripts?
I have an collection of scripts which are controlled by a main one. I want to trap the signal ctrl+c in the main script and propagate it to the others. The other scripts should trap this signal as well ( from the main script ) and do some clean-up…

Debugger
- 9,130
- 17
- 45
- 53
20
votes
3 answers
Linux C catching kill signal for graceful termination
I have a process using sockets, database connections and the likes. It is basically a server process relaying between sensor data and a web interface, and as such it is important to ensure the application, if killed, terminates gracefully.
How do I…

user623879
- 4,066
- 9
- 38
- 53
20
votes
2 answers
If I kill a System.Diagnostics.Process with .Kill(), do I also need to call .Close()?
Using C# 4.0, I've created a System.Diagnostics.Process that I expect to take a short amount of time to run. If for some reason the process hasn't exited after some amount of time (e.g, I've called .WaitForExit(timeout) and the return value was…

Chris Phillips
- 11,607
- 3
- 34
- 45
20
votes
5 answers
The right way to kill a process in Java
What's the best way to kill a process in Java ?
Get the PID and then killing it with Runtime.exec() ?
Use destroyForcibly() ?
What's the difference between these two methods, and is there any others solutions ?

Kariamoss
- 542
- 1
- 9
- 29
18
votes
4 answers
how can I kill a Linux process in java with SIGKILL Process.destroy() does SIGTERM
In Linux when I run the destroy function on java.lang.Process object (Which is true typed java.lang.UNIXProcess ) it sends a SIGTERM signal to process, is there a way to kill it with SIGKILL?

ekeren
- 3,408
- 3
- 35
- 55
18
votes
8 answers
C# Process Killing
I need to write a program in c# that would just start, kill one process\exe that it is supposed to kill and end itself.
The process I need to kill is another C# application so it is a local user process and I know the path to the exe.

Moon
- 19,518
- 56
- 138
- 200
18
votes
2 answers
How to kill a process from WiX
I am developing an installer using Wix and need to kill a process (not application) silently during installation so the user doesn't get a pop up asking to kill the process or wait and restart. I have seen solutions for killing an application but…

patrickbadley
- 2,510
- 2
- 29
- 30
17
votes
8 answers
How to kill my own Activity - the hard way
So I have my Activity, and on pressing a "Quit" button I call Activity.finish(). This effectively closes my application.
The problem: The Dalvik-process of my application is still hanging around as a zombie in background. It seems like this is…

Nils Pipenbrinck
- 83,631
- 31
- 151
- 221