From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from doolittle.vetsci.su.OZ.AU ([129.78.148.2]) by hawkwind.utcs.toronto.edu with SMTP id <2647>; Thu, 4 Jun 1992 21:21:17 -0400 Received: by doolittle.vetsci.su.oz.au id <49220>; Fri, 5 Jun 1992 11:20:57 +1000 From: John (_You_ hide, they seek.) Mackin Date: Thu, 4 Jun 1992 21:16:09 -0400 To: The rc Mailing List Subject: Re: $pid In-Reply-To: <9206032317.AA27591@stolaf.edu> Message-ID: <199206051116.24478.rc.balag@vetsci.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ This is not a bug. Byron thought about this carefully. Do you really want whatis pid and whatis pid >file to give different pids? That would be one awful consequence of having $pid behave in the way some have been suggesting recently. Now I agree that this is confusing at first, and I will stand 100% behind any proposal to change rc.1 to explain this more fully. But please, _don't_ change the code. I append the mail Byron sent me when I asked him about this. OK, John. From: Byron Rakitzis Date: Thu, 23 Jan 1992 13:54:56 +1100 To: john@vetsci.su.oz.au Subject: Re: rc file descriptor bug Received: from archone.tamu.edu ([128.194.53.42]) by doolittle.vetsci.su.oz.au with SMTP id <49478>; Thu, 23 Jan 1992 14:28:45 +1100 Received: by archone.tamu.edu id <18895>; Wed, 22 Jan 1992 20:55:01 -0600 Message-Id: <92Jan22.205501cst.18895@archone.tamu.edu> $pid is not EXPORTED. Note that this is much different from saying that a subshell of rc has $pid wiped out of its hash table. $pid obeys the following property: ~ $pid `{echo $pid} is true. Do you think it should be otherwise? How about another variable, like $ifs. Do you think that ~ $ifs `{echo $ifs} should be different? (assuming for the moment that the ~ command I wrote is just a convenient way to test the two values) I guess the easiest way to think of this is to notice that $pid never makes its way into the envp argument of an execve. Other than that, it is kept around in rc's data structures.