From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from inet-gw-1.pa.dec.com ([16.1.0.22]) by hawkwind.utcs.toronto.edu with SMTP id <2670>; Thu, 4 Jun 1992 12:56:56 -0400 Received: by inet-gw-1.pa.dec.com; id AA16385; Thu, 4 Jun 92 09:56:44 -0700 Received: by mail-relay-1.mv.us.adobe.com; id AA02529; Thu, 4 Jun 92 09:53:31 -0700 Received: from utopia.adobe.com by adobe.com (4.1/SMI-4.1)id AA23310; Thu, 4 Jun 92 09:56:35 PDT Received: by utopia.adobe.com (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)id AA26973; Thu, 4 Jun 92 09:57:16 PDT Date: Thu, 4 Jun 1992 12:57:16 -0400 From: haahr@adobe.com Message-Id: <9206041657.AA26973@utopia.adobe.com> Received: by NeXT Mailer (1.63) To: rc mailing list Subject: Re: $pid > $Pid should always mean the _current_ pid (as per the td's paper and > rc's man page) as per what? quoting from the v10 manual page:* ``$pid set during initialization to rc's process id.'' quoting from Tom Duff's UKUUG paper, section 26, paragraph 3: ``... $pid, initialized by rc to its process-id...'' in my opinion, rc's current implementation (which matches the above description) is the more useful version. remember, folks, what the most common use of $pid is: naming of temporary files to avoid collisions. now, if i want to keep referring to /tmp/foo.$pid, i should be able to w/o doing tmp=/tmp/foo.$pid and being careful to watch for $pid changing. two other reasons i can think of for keeping pid the same: (1) the bourne shell did it this way and nobody complained (2) the other interpretation can be acheived with a c program getppid: #include extern int getppid(void); int main(void) { printf("%d\n", getppid()); } but nobody's felt the need yet to do this. ---- * this is actually from a version of the v10 manual page that may have preceded the printed manuals. i don't have that version handy.