www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4541F599.1060900@byu.net> |
Date: | Fri, 27 Oct 2006 06:03:37 -0600 |
From: | Eric Blake <ebb9 AT byu DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Piping to the 'read' command |
References: | <20061027074309 DOT 0FFFE5663C AT erskine DOT cs DOT ualberta DOT ca> |
In-Reply-To: | <20061027074309.0FFFE5663C@erskine.cs.ualberta.ca> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Easton on 10/27/2006 1:43 AM: > Hi, > > Fri, 27 Oct 2006 Ian Taylor wrote: >> Can anyone explain what is happening here (using pdksh as my shell) when >> I try to set an environment variable using 'read': This is one of the bash FAQs. Read E4 on http://cnswww.cns.cwru.edu/~chet/bash/FAQ > > This suggests to me that it is executing that read in a subshell that > can't pass the variable back to its parent. This dispite the fact that > it appears to be the same process. (see inserted echo $$) Sorry, but POSIX requires $$ to be the same in subshells as it is in the parent, even though that means that in subshells, it is not the parent process id, but the grandparent. There is no way, using $$, to tell subshells apart from the original. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFQfWZ84KuGfSFAYARAhPMAJ9fPJvHGw4CsGmoCbpGQa3xmTFkdgCZAY6f c2DXrvHx4SXeFCdICLOFj6Q= =xPtQ -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |