Questions tagged [kill-process]

This tag refers to the action of terminating (aborting) a process.

Use this tag for questions related to killing a specific process on a system.

701 questions
1397
votes
34 answers

How to kill a process running on particular port in Linux?

I tried to close the tomcat using ./shutdown.sh from tomcat /bin directory. But found that the server was not closed properly. And thus I was unable to restartMy tomcat is running on port 8080. I want to kill the tomcat process running on 8080. I…
veer7
  • 20,074
  • 9
  • 46
  • 74
429
votes
11 answers

How to terminate a python subprocess launched with shell=True

I'm launching a subprocess with the following command: p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) However, when I try to kill using: p.terminate() or p.kill() The command keeps running in the background, so I was wondering how…
user175259
  • 4,641
  • 5
  • 20
  • 15
174
votes
9 answers

Kill some processes by .exe file name

How can I kill some active processes by searching for their .exe filenames in C# .NET or C++?
Aliasghar Yaghoobzadeh
  • 1,881
  • 2
  • 12
  • 10
137
votes
4 answers

How to find MySQL process list and to kill those processes?

The MySQL database hangs, due to some queries. How can I find the processes and kill them?
Ashish Dadhich
  • 4,737
  • 4
  • 17
  • 25
135
votes
13 answers

Kill a Process by Looking up the Port being used by it from a .BAT

In Windows what can look for port 8080 and try to kill the process it is using through a .BAT file?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
98
votes
22 answers

Closing Excel Application Process in C# after Data Access

I'm writing an application in C# that opens an Excel template file for read/write operations. I want to when user closes the application, excel application process has been closed, without saving excel file. See my Task Manager after multiple runs…
Javad Yousefi
  • 2,250
  • 4
  • 35
  • 52
97
votes
1 answer

what does anon-rss and total-vm mean

Recently, tomcat process on my Linux machine was killed abruptly. After investigation I found below error message in /var/log/messages file: kernel: [1799319.246494] Out of memory: Kill process 28536 (java) score 673 or sacrifice childSep kernel:…
UW20989
  • 1,157
  • 2
  • 8
  • 9
61
votes
11 answers

Kill process tree programmatically in C#

I am starting Internet Explorer programmatically with code that looks like this: ProcessStartInfo startInfo = new ProcessStartInfo("iexplore.exe"); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.Arguments =…
robr
  • 919
  • 1
  • 7
  • 16
57
votes
6 answers

How to stop 'uninterruptible' process on Linux?

I have a VirtualBox process hanging around which I tried to kill (KILL/ABORT) but without success. The parent pid is 1 (init). top shows the process as D which is documented as "uninterruptible sleep". strace shows up nothing. How can I get rid of…
Tilo Prütz
  • 1,766
  • 3
  • 16
  • 27
57
votes
10 answers

How to fix ctrl+c inside a docker container

If I connect to a docker container $> docker exec -it my_container zsh and inside it I want to kill something I started with ctrl+c I noticed that it takes forever to complete. I've googled around and it seems that ctrl+c works a bit different than…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
57
votes
6 answers

How to kill all processes with the same name using OS X Terminal

Getting the following output from running this: ps aux | grep Python Output: user_name 84487 0.0 0.0 0 0 ?? Z 12:15PM 0:00.00 (Python) user_name 84535 0.0 0.0 0 0 ?? Z 12:16PM 0:00.00 (Python) I want…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
54
votes
5 answers

linux script to kill java process

I want linux script to kill java program running on console. Following is the process running as jar. [rapp@s1-dlap0 ~]$ ps -ef |grep java rapp 9473 1 0 15:03 pts/1 00:00:15 java -jar…
d-man
  • 57,473
  • 85
  • 212
  • 296
51
votes
8 answers

subprocess: deleting child processes in Windows

On Windows, subprocess.Popen.terminate calls win32's TerminalProcess. However, the behavior I see is that child processes of the process I am trying to terminate are still running. Why is that? How do I ensure all child processes started by the…
Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
48
votes
2 answers

Does the Android OS release a wakelock if the app or service holding it is killed?

I have question about wakelock. In cases shown below, does android OS release wakelock (PARTIAL_WAKE_LOCK if you need to specify) to prevent wakelock was left acquired and wasting battery until turning power off (not sleep). Case 1-a: App has…
Tomcat
  • 1,405
  • 3
  • 22
  • 37
41
votes
3 answers

Kill tomcat service running on any port, Windows

Kill tomcat service running on any port, Windows using command promt like 8080/ 8005
Suraj Shingade
  • 2,134
  • 4
  • 17
  • 24
1
2 3
46 47