[Info-vax] Check if a process will auto-terminate

Stephen Davies noone at nowhere.com
Thu Apr 30 13:27:01 EDT 2009


"AEF" <spamsink2001 at yahoo.com> wrote in message 
news:83c3a47f-8702-47c1-a19c-e112a0fc3b9d at s1g2000prd.googlegroups.com...

>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 





More information about the Info-vax mailing list