Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11916

OLDPWD unset when bash starts

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From John Wiersba <jrw32982@yahoo.com>
Newsgroups gnu.bash.bug
Subject OLDPWD unset when bash starts
Date Thu, 19 Nov 2015 14:49:38 +0000 (UTC)
Lines 35
Approved bug-bash@gnu.org
Message-ID <mailman.220.1447944610.31583.bug-bash@gnu.org> (permalink)
References <898271888.7483238.1447944578571.JavaMail.yahoo.ref@mail.yahoo.com>
Reply-To John Wiersba <jrw32982@yahoo.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1447944610 28160 208.118.235.17 (19 Nov 2015 14:50:10 GMT)
X-Complaints-To action@cs.stanford.edu
To "bug-bash@gnu.org" <bug-bash@gnu.org>, "bash@packages.debian.org" <bash@packages.debian.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1447944599; bh=KF7ZZ+CD1TZPup9bQEkONMfKqacEeiHhceiiWBFbkMY=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=W9XqdQp9B4j7JKQcgnOdJACWq/TjbNiWg9V//8FGGEtVk0agxmGIq7f55uZIYO2IlkoXxZd0kWbaBRc8+ygfHZGv9Xr92rAgeP2z5AEJ5w6nKra2mDVFJPt/oEaHG3Jt5dHySt2/mEH8u8cG040/n6MwW/wv8zzibhmYk7yZX94Y/C3RAgRtlCUi3pou0hgwrrclRT3jvs37bLM9EPe6NFqcLNx1PBYT6BQfAqa7OgPUKiWyGL47UtST+Skhtpr0bJwRNMNjHUBikoQbbKf7Zoj81dqJXV1iAkzxtThc4eoG8xaq4bAPkIHE0YCTFPFelovLE2VyKPNJ2cf4AuI4Qg==
X-Yahoo-Newman-Property ymail-3
X-Yahoo-Newman-Id 302466.71166.bm@omp1007.mail.bf1.yahoo.com
X-YMail-OSG nftT5cUVM1kApOfhYMcgJeiFBQyYsHKVNtcUb_o7bfl9YzJoNfvfay97UABgPyk G7BSYnWPdGJFjkFmgeAkKWT5MfhIOefkewWD..ERH.9PT1aq7idAC3dzAMJheNAC6dsR7ToTn8FG S5BuiTnYDbvLXTUgibMAju7fvSpIKjXHjxQ_iJLGMYYHAGdoGNJp_Aq8gcKQuq3dnEiEBNVZToS6 I5D06XckJdlpKUwF74UNRQduQCXOfDk3RzpnOxdE5pzwGJO9X7PdvWz98FgXAwCSCzT4th7bhqSr fsrRaxlbXCTjAQlbg0PYtZONpLdq_kBnvZKnMVlcrDoFvhfHYayy15aPk2mE3fgajxvKgOuVUem4 YukY2AY.TtEVgNZMioQIKHqoB14COtGLsLpN2vX3L5.QsgRIh.uediW3lB5nYysY6FTcmrzcWt_G _Pl0Q97HyNfqL.YKvLb11oD8rtS2QwWqIvMYQWEtlnAcUlOCz8jYQBHr_12LbMAWTb7hMVakatJb hgU4-
Content-Length 975
X-detected-operating-system by eggs.gnu.org: GNU/Linux 3.x
X-Received-From 98.139.212.180
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11916

Show key headers only | View raw


From: jrw32982@yahoo.com
To: bug-bash@gnu.org,bash@packages.debian.org
Subject: OLDPWD unset when bash starts

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='l$
uname output: Linux john-mint-mate-17 3.13.0-37-generic #64-Ubuntu SMP Mon Sep $
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 11
Release Status: release

Description:

Why does bash clear OLDPWD when a child script is started?

OLDPWD is exported and passed to any children, but bash apparently clears OLDPWD whenever a child script is started:  Can bash be fixed to preserve the value of any OLDPWD in its initial environment, like it does with PWD?


This appears to happen on all 3.x and 4.x versions of bash.
Repeat-By:

$ cd /etc
$ cd
$ perl -e 'print "<$ENV{OLDPWD}>\n"'
</etc>
$ ksh -c 'echo "<$OLDPWD>"'
</etc>
$ bash -c 'echo "<$OLDPWD>"'
<>

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

OLDPWD unset when bash starts John Wiersba <jrw32982@yahoo.com> - 2015-11-19 14:49 +0000

csiph-web