How does Cygwin determine PWD

Andrey Repin
Mon Sep 30 19:16:00 GMT 2013

Greetings, Wayne Johnson!

> I am upgrading some of our scripts to use the latest version of Cygwin bash
> et. al. and run into an interesting problem that I'm having trouble
> explaining.  

> I have put bash, pwd, etc. into a directory called support_tools, and have a
> batch file that does a cd to the support_tools directory and then runs bash
> in order to capture some information.   

> In the old version of bash (3.2.49(22)) when we run bash, pwd returns the
> proper cygwinified path, like C:\Program Files
> (x86)\install_dir\support_tools.  

> Under the new bash (4.1.10(4)), when I do pwd I get /support_tools.

> How does bash (or in this case probably one of the cygwin libraries)
> determine the current directory when you start it up?

cygwin expect base files to be located in ../bin relative to the Cygwin1.dll
location, as far as I know.
I suggest you place Cygwin binaries into /support_tools/bin and supply
/support_tools/etc/fstab with desirable mount options.

Andrey Repin ( 30.09.2013, <22:27>

Sorry for my terrible english...

More information about the Cygwin mailing list