Bug 92640

Summary: A pristine /bin/sh does not set the PWD variable
Product: Base System Reporter: Jens Schweikhardt <schweikh>
Component: standardsAssignee: Jens Schweikhardt <schweikh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.0-CURRENT   
Hardware: Any   
OS: Any   

Description Jens Schweikhardt 2006-01-31 20:30:04 UTC
	SUSv3 states in  2.5.3 Shell Variables:

    [...]

    PWD

    Set by the shell to be an absolute pathname of the current working
    directory, containing no components of type symbolic link, no
    components that are dot, and no components that are dot-dot when the
    shell is initialized. If an application sets or unsets the value of
    PWD, the behaviors of the cd and pwd utilities are unspecified."

Fix: 

Implement setting PWD.
How-To-Repeat: 
$ env -i /bin/sh -c set
PS1='$ '
OPTIND=1
PS2='> '
PPID=1747
PATH=/usr/bin:/bin
IFS=' 
'
$
Comment 1 Jens Schweikhardt freebsd_committer freebsd_triage 2006-02-04 14:09:42 UTC
Responsible Changed
From-To: freebsd-standards->schweikh

I think I can fix this.
Comment 2 Jens Schweikhardt freebsd_committer freebsd_triage 2006-02-04 14:47:37 UTC
State Changed
From-To: open->patched

Fixed in CURRENT, rev. 1.27 of main.c. MFC in two weeks.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2007-07-31 07:07:44 UTC
State Changed
From-To: patched->closed

Apparently MFCed as 1.26.8.2 Nov 22 2006 UTC.