kill

Bash script to kill and restart Hudson

I am a novice at Bash scripting but I'm a quick learner. Usually. I'm trying to write a script to kill and restart an instance of Hudson--it needs to be restarted to pick up changes in environment variables. What I have so far: #!/bin/bash h=`pgrep -f hudson` if test "$h" != ""; then kill $h while [ "$h" != "" ]; do sleep 1 ...

Killing processes on Windows 7

I'm debugging plugins on Windows 7 and of course the plugin host (Cubase5.exe) occasionally crashes because of errors in the plugin. On XP or Vista, I could always restart it immediately and continue working. But on Windows 7, even though Cubase appears to close, it is still visible in Task Manager and I cannot kill it by any means. Afte...

AM kill proces and did not restart all services

Hi , we observed one scenario where activity manager killed our application process(it includes 5 running services) and then when it re-started the application process, it re-started only 1 service (this service was first one to be destroyed) . I/ActivityManager( 1660): No longer want com.android.bluetooth (pid 4961): hidden #16 I/Activ...

kill application after crash

I haven't manage all errors on my application anymore. So I would like to know if it is possible to Kill the entire app when it crashes? (when the message "app MyApp crash, force close" appear, I would like the application to be killed when user clicks on "force close") ...

The bizarre case of the file that both is and isn’t there.

In .Net 3.5, I have the following code. If File.Exists(sFilePath & IndexFileName & ".NX") Then Kill(sFilePath & IndexFileName & ".NX") End If At runtime, on one client's machine, I get the following exception, over and over, when this code executes Source: Microsoft.VisualBasic TargetSite: Microsoft.VisualBasic.FileSystem.Kill Mess...

Why is there no uncatchable coredump signal?

I recently came across an app that froze in a SIGABRT handler with no other signal registered to immediately core dump. Until we standardize leaving one of SIGSTOP, SIGABRT, SIGTRAP, etc., alone, we'll just use gcore and SIGKILL, but given that broken handling was the issue, I wondered why there isn't along with SIGSTOP and SIGKILL a st...

How to Kill Java Process in Windows, WITHOUT killing javaw.exe?

I have an external Windows .exe that is actually Java application: Running the .exe starts javaw.exe, which in turn runs that Java application. I didn't write that application and have no access to it through an API. I need to be able to kill it, however. So right now I just kill the Windows process javaw.exe, which is fine for a test m...

What is the best way to close this group of processes?

I have the following group of processes, which need to be closed programmatically by the first listed process, which is a C program that I am coding. PID PGRP SESN PPID USER TTY CMD 6553 6553 6553 1 root ? ./startserv 6554 6553 6553 6553 root ? expect -- /usr/bin/unbuffer ./srcds_run... 6555 655...

Emacsclient hook on kill

Hi I am trying to find a hook in Emacs, which should fire right before emacs server graceful shutdown. I tried kill-emacs-query-functions, kill-emacs-hook, server-done-hook with elisp like : (add-hook 'server-done-hook '(lambda () (savehist-save) ) ) ... but none of them is called when OS...

A Process is refusing to die

Based on other questions, I'm using System.Diagnostics.Process to Start and Kill a process: this.childProcess.Kill(); this.childProcess.WaitForExit(); this.childProcess.Close(); I would assume that WaitForExit deals with the asynchronous nature of the Kill command, however the process in question (perl.exe) refuses to die. Instead it...

How can I complete the process in Win32 on behalf of the process in Perl?

For example, to have rschit process excell.exe means Perl. ...

Android - Activity of a killed process is still visible in list after [Home] pressed

Hi all, like many others, I want to kill my Android application on "exit" button. Really kill, not just move to background and stop all active code. (I know very well that Android does not like it.) I found Process.killProcess(Process.myPid()); and System.exit(0) which both work fine (I have no problem with activity stack, the "exit" bu...

How can I stop a running MySQL query?

I connect to mysql from my Linux shell. Every now and then I run a SELECT query that is too big. It prints and prints and I already know this is not what I meant. I would like to stop the query. Hitting Ctrl+C (a couple of times) kills mysql completely and takes me back to shell, so I have to reconnect... Is it possible to stop a query ...

Linux - killing some processes owned by apache safely

Hi all. I have a bunch of processes owned by apache that are running for days because they are stuck. apache 11173 0.1 0.0 228248 27744 ? Ss Sep27 3:58 php /var/www/html/myproj/symfony cron:aggregation --env=prod apache 12609 0.1 0.0 228244 27744 ? Ss Sep18 19:30 php /var/www/html/myproj/symfony cron:aggr...

Linux: What happens to active threads hooked into system monitors when a process is killed?

I've written a tool that uses inotify watches to monitor directory changes. It starts a separate thread per watched directory, each using inotify to setup the watch. What happens to these threads/watches if the parent process is terminated with kill? ...

Handle force close?

Hello, Is there a way to notify an activity/service of a force-close request right before it gets killed? I mean when the user hits the force close button in Menu>Settings>Applications>Manage applications>app name>Force Close. Thanks! ...

Process is killed suddenly without any debugging message in VS2010.

Hello everyone. I am using c# and VS2010. My program is working client, server and agent. Each programs are communicated with WCF. But only agent is killed suddenly. and Server recives agent's fault event. Generally, if exception is occured in vs 2010, vs2010 is breaked a line that occured a exception But agent is not stopped. just kil...

Python : Closing a socket already opened by a precedent python program or dirty trick to close a socket.

here is my dirty little web server : class Serverhttp: def __init__(self): self.GET = re.compile("GET.*?HTTP") self.POST = re.compile("POST.*?HTTP") try : sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('localhost', 36000) print >>sys.stderr, 'starting up on %s port %s' % se...

how to kill background php thread ?

I created a php script that has ignore_user_abort(true); in it, and it is running in infinite loop... I closed the webpage, apache server and the browser too.. Its running like a armageddon now.. Nothing seems to stop it.. how do I stop it ?? What does it run as (process name) in windows ?? I searched for terms related to php or server ...

How do I kill an unattended scheduled task? (Windows)

I have a runaway windows task, if I were running it as a logged in user I would use Process Explorer (procexpe.exe) and look for the related cmd.exe and kill it there, but this one is running with a user who is not logged in. I can't figure out how to kill it. Any Windows Wizards out there know how to do this? ...