Another way of looking at that is that the trick would be
to figure out what the process associated with a.cmd are and kill them as well
as. More thorough.
Good luck.
Al
From: Baekelant, Erik [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] OT: batch/command file and "child-processes" kill ing
>>> why are you killing a.cmd vs. letting it finish it's run?
<<<
a) Ask
the Operators ;o)
b) The
scheduling client is killing a.cmd and not b.exe, as it doesn't know about b.exe
being a child from a.cmd.
The
trick would be to lauch/spawn b.exe in that way that it is automatically killed
when a.cmd gets killed.
anyway, thanks for the reply !!
-----Original Message-----
From: Mulnick, Al [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 3:16 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] OT: batch/command file and "child-processes" kill ing
From: Mulnick, Al [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 3:16 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] OT: batch/command file and "child-processes" kill ing
That raises some interesting questions, such as why are you
killing a.cmd vs. letting it finish it's run? I assume since it's a
scheduler, you're killing it at the end of the process window. But killing
a cmd is not going to kill the child process. A cmd is about the same as a
bat file: it's can call the other commands asynchronously and they can spawn
separate from the cmd parent.
What you probably want to do is enumerate the processes
under a.cmd and kill those first. Walk up the tree rather than lopping the
top off as it were. You can see what the tree looks like with tlist -t
Taskkill? New to me. Kill.exe is a reskit
utility that can be used. Kill.exe pid -f is what usually works, but
not always depending on the app.
More background on the kill concept: http://msdn.microsoft.com/library/default.asp?url="">
From: Baekelant, Erik [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 8:52 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] OT: batch/command file and "child-processes" kill ing
BTW,
I know I could use
taskkill /t
But the Scheduling
software uses a regular "kill" thing . . .
-----Original Message-----
From: Baekelant, Erik [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 2:29 PM
To: '[EMAIL PROTECTED]'
Subject: [ActiveDir] OT: batch/command file and "child-processes" killing
From: Baekelant, Erik [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 2:29 PM
To: '[EMAIL PROTECTED]'
Subject: [ActiveDir] OT: batch/command file and "child-processes" killing
Hello
First of all, apologies for going OT . . .
We are introducing our Scheduler software
(Client-side, CA Autosys) in the Windows environment.
Everything starts fine, except stopping/killing jobs.
Batch-file (a.cmd) calls another program (b.exe)....
a.cmd gets killed but b.exe keeps running.
It
is like (without using scheduler things) killing the batch and wanting the
"child-processes" to quit too.
Anyone any idea on how to execute b.exe from within a batch/command-file a.cmd ?
Much appreciated,
Erik
