Date: Mon, 11 Jun 2007 14:22:05 -0400 From: John Baldwin <jhb@freebsd.org> To: Jens Schweikhardt <schweikh@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/bin/sh main.c Message-ID: <200706111422.06334.jhb@freebsd.org> In-Reply-To: <200602041447.k14ElJPa016989@repoman.freebsd.org> References: <200602041447.k14ElJPa016989@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 04 February 2006 09:47:19 am Jens Schweikhardt wrote:
> schweikh 2006-02-04 14:47:19 UTC
>
> FreeBSD src repository
>
> Modified files:
> bin/sh main.c
> Log:
> Initialize PWD early on (don't expect it to be inherited from the
> environment or set it only when changing directories with cd).
>
> PR: standards/92640
>
> Revision Changes Path
> 1.27 +2 -0 src/bin/sh/main.c
I just recently updated my system to contain this and it has broken all
my /bin/sh shell scripts that use p4 which is highly annoying. Specifically,
I use the default freebsd layout of:
/home -> /usr/home
and
/home/jhb as my homedir in the password file. I also use tcsh as my login
shell. tcsh understands that it starts out in /home/jhb without issue, but
exec'ing sh rewrites $PWD which in turn confuses p4 since it uses $PWD to
figure out if a path is under the client path. Can we at least have an
option to turn this off?
[14:18:58] (ttyp7) jhb@mutex:~
> echo $PWD
/home/jhb
[14:19:05] (ttyp7) jhb@mutex:~
> sh
$ echo $PWD
/usr/home/jhb
$
Either that or I have to go hack all my scripts to rewrite $PWD. :(
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706111422.06334.jhb>
