Newsgroups: comp.parallel.pvm
From: scheer@cs.utwente.nl (Rienk van der Scheer)
Subject: How to recognize the console process
Organization: University of Twente, Dept. of Computer Science
Date: 25 Apr 1996 13:39:58 GMT
Message-ID: <4lnvbe$8fe@utrhcs.cs.utwente.nl>

I'm writing an SPMD program. The first process starts a number
of copies of itself. I would like to have the possibility to choose
between starting the first process from the Unix Shell or from
the PVM console.
To detect whether a process is the first one, I use a combination
of the parents TID and it's executable name (reported by pvm_tasks).
It works fine when started from the PVM console, but not from
the Unix Shell, because the executable name of the first
process (started from the Unix Shell) is not set.

Is there any way to detect whether a process' parent is the PVM console
or process started earlier from the Unix Shell?

Any suggestions will be appreciated.

Rienk

--
Rienk van der Scheer
scheer@cs.utwente.nl
http://www.cs.utwente.nl/~scheer/

