Subject: bin/7814: Handling of "cd" seriously broken in "sh"
To: None <>
From: Matthias Scheler <>
List: netbsd-bugs
Date: 06/19/1999 09:05:43
>Number:         7814
>Category:       bin
>Synopsis:       Handling of "cd" seriously broken in "sh"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 19 09:05:01 1999
>Originator:     Matthias Scheler
Matthias Scheler                      
>Release:        990618
System: NetBSD 1.4C NetBSD 1.4C (LYSSA) #0: Wed Jun 16 15:25:38 CEST 1999 i386

If a shell script used "cd" within a command substitution the working
directory of the calling shell is changed.


Call this shell script:

echo "`cd /`" >/dev/null
exit 0

It should print out the same of the directory where it was started but
it prints out "/".

Sorry, but I don't know.