[Thread Prev][Thread Next][Index]

Re: process ID, collisions



Hi Andrew,

Some Unix shells allow you to get the process id of the calling process. For instance, if you are using bash try:

spawn echo $PPID

At 02:24 PM 8/19/2002 -0400, Andrew Wittenberg wrote:
On Mon, 19 Aug 2002, Steve Hankin wrote:
>     yes? LET pid = {SPAWN:"echo $$"}
>     yes? SAVE/FILE=tmp.`pid`  ...

Hi Steve,

Thanks for your reply -- but this appears to have the same problem as the
example in my original message (spawn echo $$)  E.g. try this:

yes? let pid = {SPAWN:"echo $$"}; list pid
yes? let pid = {SPAWN:"echo $$"}; list pid

You should get 2 different answers.  I believe it's returning the "spawn"
subshell PID, not the Ferret PID, right?

Andrew

----------------------------------------------------------------------
Andrew Wittenberg          Program in Atmospheric and Oceanic Sciences
andyw@splash.princeton.edu                        Princeton University
----------------------------------------------------------------------



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement