rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John (_You_ hide, they seek.) Mackin <john@vetsci.su.oz.au>
To: The rc Mailing List <rc@hawkwind.utcs.toronto.edu>
Subject: Re: $pid
Date: Thu, 4 Jun 1992 21:16:09 -0400	[thread overview]
Message-ID: <199206051116.24478.rc.balag@vetsci.su.oz.au> (raw)
In-Reply-To: <9206032317.AA27591@stolaf.edu>

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 <byron@archone.tamu.edu>
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.


  parent reply	other threads:[~1992-06-05  1:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-06-03 23:17 $pid Erik Quanstrom
1992-06-03 23:49 ` $pid Chris Siebenmann
1992-06-05  1:16 ` John Mackin [this message]
     [not found] <cks@hawkwind.utcs.toronto.edu>
1992-06-04 10:05 ` $pid malte
1992-06-04 12:14 $pid Erik Quanstrom
1992-06-04 16:57 $pid haahr
1992-06-04 17:01 $pid haahr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199206051116.24478.rc.balag@vetsci.su.oz.au \
    --to=john@vetsci.su.oz.au \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).