Re: Check if a process will auto-terminate
- From: AEF <spamsink2001@xxxxxxxxx>
- Date: Thu, 30 Apr 2009 18:48:23 -0700 (PDT)
On Apr 30, 1:27 pm, "Stephen Davies" <no...@xxxxxxxxxxx> wrote:
"AEF" <spamsink2...@xxxxxxxxx> wrote in message
news:83c3a47f-8702-47c1-a19c-e112a0fc3b9d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Steve,
Does this do what you need?
$ TYPE CMD*.COM
DISK$DATA1:[FELDMAN.VMS.DCL.SPAWN]CMD.COM;1
$ SPAWN/NOWAIT @CMD_SUB.COM
$_WAIT:
$ WAIT 0:00:01
$ NUMSUB = F$GETJPI("","PRCCNT")
$ IF (NUMSUB.GT.0) THEN GOTO _WAIT
Alas no, because that would mean that CMD always waits for
CMD_SUB to finish.
What I want is for CMD to do "spawn/nowait @CMD_SUB" and
then exit when called like this:
$ @CMD
or like this:
$ spawn
$ @CMD
But I want CMD to wait for CMD_SUB when called like this:
$ spawn @CMD
or like this:
$ spawn /nowait @CMD
Does this do what you want? (Put commands for the CMD.COM in part 1
and those for CMD_SUB.COM in part 2.)
$ TYPE CMD2.COM
$ IF (P1.EQ.1) THEN GOTO PART1
$ IF (P1.EQ.2) THEN GOTO PART2
$ SPAWN @CMD2.COM 1
$ SPAWN @CMD2.COM 2
$ EXIT
$
$PART1:
$ WRITE SYS$OUTPUT "PART 1 HERE"
$ EXIT
$
$PART2:
$ WRITE SYS$OUTPUT "PART 2 HERE"
$ EXIT
$
It's late. I hope I got it right! :-)
The only problem I see is that you don't get the prompt string for the
first command you run after the SPAWN/NOWAIT run. 'Hope that's not a
problem!
AEF
.
- Follow-Ups:
- References:
- Re: Check if a process will auto-terminate
- From: Stephen Davies
- Re: Check if a process will auto-terminate
- Prev by Date: Re: Request description of UFS for VMS person
- Next by Date: Re: Request description of UFS for VMS person
- Previous by thread: Re: Check if a process will auto-terminate
- Next by thread: Re: Check if a process will auto-terminate
- Index(es):
Relevant Pages
|