Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42CDF9C9.6080207@byu.net> Date: Thu, 07 Jul 2005 21:58:01 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: "Jon A. Lambert" CC: Cygwin Mail List Subject: Re: [ANNOUNCEMENT] Updated: bash-3.0-7 References: <005301c5831d$04a10980$0200000a AT agamemnon> <001101c58332$5ae5f2f0$0200000a AT agamemnon> <003f01c58342$9b74a400$0200000a AT agamemnon> In-Reply-To: <003f01c58342$9b74a400$0200000a@agamemnon> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jon A. Lambert on 7/7/2005 4:24 PM: > I solved the problem. > My orignal cygwin.bat file contained: > SET HOME=c:\cygwin\home > My profile conatined: > set HOME=\home\$USER > > This used to work just fine in bash-2. Doesn't work in bash-3. Well, there is still something here that bothers me - the fact that the expansion for ~ is being cached: $ /bin/sh # the dynamically linked, stripped, cygwin copy $ echo $HOME /home/eblake $ echo $HOME ~ /home/eblake /home/eblake $ HOME=/tmp $ echo $HOME ~ /tmp /home/eblake Whereas: $ /usr/local/bin/bash # my statically linked full-debugging copy $ echo $HOME /home/eblake $ echo $HOME ~ /home/eblake /home/eblake $ HOME=/tmp $ echo $HOME ~ /tmp /tmp I also know that bash maintains its own environment, bypassing getenv() and putenv() for speed. So, I'm guessing that statically, bash's inline copy of readline reads the same environment for $HOME through a hook (see /usr/src/bash-3.0/lib/tilde/tilde.c, sh_get_env_value()), but dynamically, libreadline6 falls through to raw getenv() and is unable to see the updates to the environment, seeing only what was in the environment at startup. This does not sound like a pleasant bug to fix, since I don't maintain the libreadline6 to see where it is failing to call bash's hooks to grab the correct version of the environment. > Now everything works as it gets it from etc/passwd. > so nevermind.. :-) I'm glad your workaround fixed it. NOTE to other readers - bash-3.0-7 does not properly update tilde-expansion when $HOME is changed after login. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCzfnJ84KuGfSFAYARAmXMAJ0RCL12WnolPsXqWPgD6Sa0ppbEoQCgmPAX 9y4aS+pPBm5fIBmFQQqOEFA= =mHjv -----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/