kill

Who "Killed" my process and why?

My application runs as a background process on Linux. It is currently started at the command line in a Terminal window. Recently a user was executing the application for a while and it died mysteriously. The text: Killed was on the terminal. This happened two times. I asked if someone at a different Terminal used the kill command ...

Return code when OS kills your process

Hello, I've wanted to test if with multiply processes I'm able to use more than 4GB of ram on 32bit O.S (mine: Ubuntu with 1GB ram). So I've written a small program that mallocs slightly less then 1GB, and do some action on that array, and ran 5 instances of this program vie forks. The thing is, that I suspect that O.S killed 4 of them...

What should I do to modify my fork() in C to run well?

I dont understand why my code does not work. This is my code. I don't know why I'm get an error segment. Could somebody explain the reason to me? #include <iostream> #include <string> #include <sys/types.h> #include <unistd.h> int id_process; void manager_signal () { kill (id_process, SIGKILL); kill (getppid(),SIGKILL); } in...

How can I kill Perl 'system' calls when the main script is killed?

Pervious answers to this questions have focused on forks: kill background process when shell script exit How to make child process die after parent exits? Are child processes created with fork() automatically killed when the parent is killed? For this question, I'm just asking about calls to the 'system' function. Say I have a scri...

sever/kill tcp connection in windows

I would like to see how a program responds when it's connection is severed. Aside from disabling the network card, is there a way to sever a tcp connection in Windows without killing the process, or the thread that owns the connections? ...

Start Thread with a given execution time

My main process calls an external library method. This method sometimes hangs. I can not fix the external library because another company is responsible for it. I want to use a Thread for the library calls with a defined execution timer. When the method call takes to long, the Thread with the Runnable in which the method call is placed ...

Best Practice for killing a JavaME 1.2 thread?

Question: I'm interested to know the best practice for killing a long standing operation that is running as a background thread (lets call this thread WorkerThread) in Java 1.2. Scenario Specifically, I'm developing an application for Blackberry devices whereby I make a HTTP connection. Big picture: a URL request if forwarded to a back...

How can one send a Ctrl-Break to a running Linux process?

I am debugging a memory leak in an application running on Sun's JDK 1.4.2_18. It appears that this version supports the command line param -XX:+HeapDumpOnCtrlBreak which supposedly causes the JVM to dump heap when it encounters a control-break. How does one send this to a background process on a Linux box? It appears that kill signals...

How to terminate process using VBScript

Hi, I have this VBScript code to terminate one process Const strComputer = "." Dim objWMIService, colProcessList Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'Process.exe'"...

[C++] How can I kill all processes of a program?

Hey everybody, I wrote a program that forks some processes with fork(). I want to kill all child- and the mother process if there is an error. If I use exit(EXIT_FAILURE) only the child process is killed. I am thinking about a system("killall [program_name]") but there must be a better way... Thank you all! Lennart ...

Mac OS X: Quickest way to kill/quit an entire process tree from within a Cocoa application.

I know there are many questions and answers about this, but I am looking for an efficient and robust solution. I need to kill a process AND all it's child processes from within a Cocoa app. I got the process ID and what I am about to code is to execute the kill command like so kill -- -<parent PID> from within my app ... but that seem...

Processlist

How do I get a process list of all running processes from Python, on Unix, containing then name of the command/process and process id, so I can filter and kill processes. ...

Killing thread instantly in Java

Is it possible to kill a Java thread without raising an exception in it? This is just for testing purposes - I want to simulate a case when the entire computer dies mid-thread. Note - I saw a deprecated Thread.destroy() method, but the documentation says it never got implemented in the first place. ...

How to terminate all [grand]child processes using C# on WXP (and newer MSWindows)

Question: How can I determine all processes in the child's Process Tree to kill them? I have an application, written in C# that will: Get a set of data from the server, Spawn a 3rd party utility to process the data, then Return the results to the server. This is working fine. But since a run consumes a lot of CPU and may take as lo...

How to implement a kill switch in a native windows program

We've got issues with our program potentially hanging in certain situations, is there a way to search and destroy your own program with windows calls without using task manager. It probably wouldn't make sense to include this in the program itself, but as a bundled thing no one would see. What's the best way to go about doing this, h...

What is the correct way for a program to terminate its own process (Windows)

C# .NET 3.5 I have a console application that is being called by another application on the computer. This console app runs continuously, and listens for data on stdin from the "parent" process. However, when the parent is stopped or killed, the console app that it started continues. Under normal circumstances, it sits and idles wa...

Kill Running Application

Hi, The application should kill itself How to do in vb.net? Please Help me in this case... ...

Removal after some Iterations: yes | rm -r .git

I need to kill the "yes" command after some iterations, two methods: a) kill it b) give "n" as an input after some time How would you automate the removal of .git directory? ...

Crash and Socket Failure: 9-signalling Processes with Sudo

The aim of the test is to simulate a serious fatal error, peeking into kernel due to the socket failure. It is good practise in cases such as crash-recovery. 9-signalling all postgres processes ignite errors immediately after the command: $ psql psql: could not connect to server: Connection refused Is the server running locally...

Kill process after launching with AuthorizationExecuteWithPrivileges

If I launched a shell script using AuthorizationExecuteWithPrivileges what would be the easiest way to kill the script and any other processes that it spawned. Thanks ...