Re: Killing process started by system()?
- From: Joe Beanfish <joe@xxxxxxxxxx>
- Date: Thu, 28 Sep 2006 13:05:35 -0400
carsonbj@xxxxxxxxx wrote:
Is there anyway to kill a process that has been started by the system()
function?
All processes are killed the same way, with kill/signal().
I'm guessing that perhaps you're really wanting to know how to get
the PID to kill from system. You can't. You'll have to figure it
out from ps or something. Or use fork() & exec() & wait() so you
have the PID.
.
Relevant Pages
- Re: Periodic Fedora 9 system hangs with jumpy mouse
... kill -TERM pid ... to do with graphics card and driver. ... (Fedora) - Re: how can I make sure only one instance of gkrellm runs
... It is the standard way of probing for a process given a pid. ... "man 3p kill" says: ... since the script is executing the command ... But for a single person running a single GUI ... (Fedora) - RE: threads in perl
... Instead of xterm I tried to invoke some other script: ... How can I kill exec after it was started in different thread? ... But threads all share the same pid, ... When life conspires against you, and no longer floats your boat, Don't waste your time with crying, just get on your back and float. ... (perl.beginners) - Re: Killing a process tree? - 1 attachment
... Well, you could use ps to get process and parent process pid, ... match subprocess to parent process, and kill in reverse order. ... (alt.os.linux) - trap not work in program with a subshell environment
... print "killed $PID." ... trap handle_signal INT TERM ... And here is the process tree. ... If I kill the second "1.ksh", ... (comp.unix.shell) |
|