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

Joseph Huber joseph.huber at NIRWANA.web.de
Tue Apr 28 14:20:51 EDT 2009


Stephen Davies schrieb:
> "Joseph Huber" <joseph.huber at NIRWANA.web.de> wrote in message 
> news:gt7dug$s25$1 at online.de...
>> Stephen Davies schrieb:
>>> That does not distinguish this:
>>> $ spawn @CMD
>>>
>>> from this:
>>> $ spawn
>>> $ @CMD
>> Of course it does, the second @CMD executes in the master process, the 
>> first one is a subprocess of a different master process.
> 
> $ spawn say f$getjpi("","MASTER_PID")
> Process USER_1 spawned
> Terminal now attached to process USER_1
> 12345678
> Control returned to process FTA1
> 
> $ spawn
> Process USER_1 spawned
> Terminal now attached to process USER_1
> $ say f$getjpi("","MASTER_PID")
> 12345678
> $ lo
> Process USER_1 logged out at ...
> Control returned to process FTA1 
> 
> 

o.k. now I see You not only want to know if the context is subprocess at 
all, but if it is one or more levels deep.
Then I think You have to compare in addition MASTER_PID ans OWNER, 
because they will differ.

But there is no way I know of to differentiate if the parent process has 
done a plain "SPAWN" or a "SPAWN @CMD".
But I repeat: why is it important to know ?
The only case where it matters is to avoid "SPAWN/NOWAIT @CMD".

-- 

  Joseph Huber   - http://www.huber-joseph.de



More information about the Info-vax mailing list