-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12.06.2013 14:47, Corinna Vinschen wrote:
> Hi Алексей,
>
> On Jun 11 21:10, Алексей Павлов wrote:
>> MSYS includes the following changes to Cygwin to support using native Win32
>> programs:
>> 1. Automatic path mangling of command line arguments and environment
>> variables to Win32 form on the fly for Win32 applications inside bash.exe
>
> That's a bash change which does not affect the underlying Cygwin/MSYS DLL.
You misinterpreted that.
The mangling is done in msys-2.dll, it's done every time a process is
spawned. The parent checks the dependencies of the child, and if child
does NOT depend on msys-2.dll (that is, if child is not a MSYS
application), the parent will spawn it with mangled environment (thus
the child will not get POSIX paths in envvars, such as PATH) mangled and
arguments (thus the code that invokes the spawning functionality is free
to give POSIX paths in the arguments to the child, but the actual child
will get appropriate DOS paths in the arguments instead).
Try doing this in Cygwin:
$ echo 123 >~/test.txt
$ $WINDIR/notepad.exe ~/test.txt
I expect that this wouldn't work, unless Cygwin expands ~ to a DOS path.
Or this (obviously, fix the path to sh.exe for your machine):
$ echo A=%PATH% && C:\Cygwin\bin\sh.exe --login -i -c "echo B=$PATH;
percent=%; $COMSPEC //C echo C=${percent}PATH${percent}"
When i do this in MSYS, i get something like this:
A=C:\Windows\system32;C:\Windows
B=.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows
C=.;f:\msys05\local\bin;F:\mingw05\bin;f:\msys05\bin;c:\Windows\system32;c:\Windows
I'm not sure about the implementation details, you'd have to ask alexey
(namely, is that a change in fork() or exec()? What about posix_spawn()?).
- --
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
iQEcBAEBAgAGBQJRuGLQAAoJEOs4Jb6SI2CwrZIIAMf7Dn6CVPXacGCE4sgUG05A
j+yHZLJ2QLcYaVvlTKgYpTox2xpDTKtAbDZRlC1EK3OYpC3aPYm1EOLgKFZ8WMWK
6An6UnNpSaszWVRuszmdSe9VO15na3i7QmcQFzCg3OVIz67glfAaYTpkmjpZuU9J
jUfR3jOvocoayIGu3pWX3SliiHFeCYQyV6wUka60ja0L0ms7kvezOaGI28w91tMl
Ii0aSh3RCQ+lzUqbmpKmLqSrdlj4AGul2cgkfGro3U7uvAnDLMi5w4QP7AAboEg1
45DQ9owdPllpg+JiTjUFB61RjVuzw5gRZ10FTsMJji+9P/e9IdlZdx83GHpCyt0=
=0MwS
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public