kill

killproc and pidofproc on linux

Hi, I have a script which uses killproc and procofpid commands and executes fine on a 64bit suse. But when I executed the script on 32bit redhat , I found that the above commands donot exist. I don't have a 32bit Suse and 64bit redhat machines to test my script. Is my guess right that on 64bit redhat the above commands should be avai...

How to kill an alert window in Windows using C#?

Hi, I am using the System.Diagnostics.Process Namespace in C# to start a system process, sometimes this new created process won't start properly, in these cases Windows shows me an alert window giving information about the failed process. I need a way to close (kill) this alert window programatically. I tried the following code but it d...

Android: How to kill an application with all it's activities?

I want to offer the user an option to exit the application as I need to delete some sensitive data, which is stored in the SharesPreferences as long as the application needs it. As soon as the user wants to exit, the password in the SharedPreferences should be wiped and of course all activities of the application should be closed (it ma...

How can I GAE (Eclipse IDE) to kill previous instance of test server when I start debugging?

GAE Eclipse IDE launches test server instance when I start debugging. But the test server instance does not killed when I restart the debugging after some code modified. This annoying. I have to kill previous instance manually on each time before new instance launched because previous instance holds port. How can I make the IDE kill pre...

Android: Howto 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 normal as other applications do the same. Even The hello-world example hangs around in memory....

PHP - child process blocking SIGTERM for parent

Hi all, I'm having problems with killing parent process that have 1 child - parent is waiting for child to exit and only after that kill handler is called. When the kill handler is not installed (pcntl_signal(SIGTERM, "kill_handler")) script terminates immediately. I need that after submitting kill command to terminate parent process ...

terminate script of another user

On a linux box I've got a python script that's always started from predefined user. It may take a while for it to finish so I want to allow other users to stop it from the web. Using kill fails with Operation not permitted. Can I somehow modify my long running python script so that it'll recive a signal from another user? Obviously, t...

running pskill.exe "access denied"

Im attempting to kill a process remotely by using pskill. From the command line, pskill works great, but when trying the same command in C# Im getting an access denied error. var startInfo = new ProcessStartInfo { FileName = "pskill.exe", Argume...

C# killing a thread

Hi guys, In my app, I have a thread that runs continuously. By using Thread.Sleep(), the function executes every 10 minutes. I need to be able to kill this thread when a user clicks a button. I know Thread.Abort() is not reliable. I can use a variable to stop the thread, but since it is sleeping it could be another 10 minutes before th...

Batch File help needed for PsList/PsKill when a process is over a specific age (elapsed time)

I'd like to request some help in creating a Batch file to run on a windows server which will monitor processes which sometimes get "stuck" and linger after they should be killed. Specifcally, I can see the "age" of a process in the Elapsed Time column of the PsList command http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx N...

How to shut down toast messages and activities

I cannot stop Toast messages that continue even when I have destroyed the activity from which they originate. They are queued and just carry on and on and on when I am in the next activity. ...

Can't Kill xls files

I have been using every version of Kill routines to delete xls files in the current directory with no success. Here is my code. I want to delete every xls file except wbCntl. Stepping through this code shows that everything works with the exception of the Kill swb command. (swb is public defined as a string) 'Close all files exce...

C# Windows Form Killed By Task Manager...Is There a Way to Run Shutdown Function?

I doubt this is even possible. So your app is running and user decides to End Process via Task Manager. Is there a method/action to save data during process.kill? I doubt there is but I had to ask. Also, if a user shuts down/restarts PC (as in windows update/manual restart), what action would the app execute? Window_Unloaded? On this s...

Kill and restart multiple processes that fit a certain pattern

I am trying write a shell script that will kill all processes that are running that match a certain pattern, then restart them. I can display the processes with: ps -ef|grep ws_sched_600.sh|grep -v grep|sort -k 10 Which gives a list of the relevent processes: user 2220258 1 0 16:53:12 - 0:01 /bin/ksh /../../../../../ws_...

C# catch kill command

Hi, how can I catch windows taskkill command in order to prevent it? ...

"Gracefully" killing a process

Right now I am using Process.Kill() to kill a process. Is there a way though, instead of just killing it immediately, that I can like send a message to the process instructing it to close so that it can gracefully clean up and shut down. Basically, I'm looking for the equivlent to just clicking the red X in the upper right hand corner, w...

Kiling processes in C with Signals

The main process in my program forks 3 more process with say process ids as pid1, pid2, pid3. Pid1 and pid2 processes are in infinite loop. What I want is when pid3 process is over all the process including the main are terminated. As of now, I am using : wait(pid3); kill(0, SIGKILL); which do all above as i said, but it prints Killed...

first process of python popen pipe can't be killed

I am using this code p1 = Popen(['rtmpdump'] + cmd_args.split(' '), stdout=PIPE) p2 = Popen(player_cmd.split(' '), stdin=p1.stdout, stderr=PIPE) p2.wait() # try to kill rtmpdump # FIXME: why is this not working ? try: p2.stdin.close() p1.stdout.close() p1.kill() except AttributeError: # if we use python 2.5 from sign...

terminate called after throwing an instance of 'NSException'

I am trying to call a page that contains a picker. My app is killed as soon as I select the button that used to call my picker page. Not sure what is causing this error - "terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”." Does anyone have a clue? I have provided the information that I ...

killing an infinite loop in java

I am using a third-party library to process a large number of data sets. The process very occasionally goes into an infinite loop (or is blocked - don't know why and can't get into the code). I'd like to kill this after a set time and continue to the next case. A simple example is: for (Object data : dataList) { Object result = Thei...