2013/6/12 LRN <[email protected]>:
> -----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()?).

hmm, to translate environment on process-start for
none-cygwin-processes looks to me like a feature belonging in general
to cygwin-dll, isn't it?
If not done, then I see it more as a bug there then a good argument
for cloning it.

Kai

------------------------------------------------------------------------------
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

Reply via email to