Web lists-archives.com

Re: Unexpected behavior of ~ when calling bash from a different cygwin installation




Greetings, Soegtrop, Michael!

> I got it, I just have to clear the HOME variable before.

> But I have a few more observations on this:

> the FAQ (section 4.20) state that the root path for the mount table depends
> on the path of the cygwin1.dll, to which an executable is linked.

"Linked" in this case should be read as "first cygwin1.dll loaded".

> This
> doesn't seem to be the case. E.g. when I do

> * start a bash via C:\bin\cygwinA\cygwin.bat 
> * cd to /cygdrive/c/bin/cygwinB/bin
> * ./bash

> The first and the second bash have both /=C:\bin\cygwinA although
> SysInternals ProcExplorer clearly shows that the second bash loads the
> cygwin1.dll from C:\bin\cygwinB and not from C:\bin\cygwinA. Is there some
> description on how the path mapping really works?

The mapping is consistent throughout the execution tree.

> If I do:

> * start a bash via C:\bin\cygwinA\cygwin.bat 
> * cd to /cygdrive/c/bin/cygwinB/bin
> * /cygdrive/c/Windows/System32/cmd
> * bash

> The dlls to which the second bash links are the same in both cases, but in
> the second case /= C:\bin\cygwinB in the second shell.

Indeed, since you cleanly broke out of cygwin execution tree.

> And yes, I also read in section 4.20 of the FAQ that one shouldn't call one
> Cygwin from another. But I think a clear handover from one bash to another should work in a documented way.

It does.
Do not mix Cygwin installations. At best, nothing will work, at worst, you'll
get unpredictable behavior that is hard to track down.
Each Cygwin installation have its own rebase map.


-- 
With best regards,
Andrey Repin
Saturday, June 16, 2018 2:34:34

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple