This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding MSYS functionality to Cygwin

On 6/18/2013 20:02, Christopher Faylor wrote:
On Tue, Jun 18, 2013 at 04:04:06PM -0600, Warren Young wrote:
It would be possible, though somewhat evil, for Cygwin's exec()
implementation to peek at the DLL dependency list of a program before
starting it, and from that infer whether it should automatically
translate paths.

Cygwin already does this.  It detects whether the program it is about
to run uses the Cygwin DLL and, if not, makes decisions on how to
handle exec.  It would be relatively easy to extend this.

Well, given that we're already paying the "peek" cost, I don't have any objection to making exec() take longer for the native Windows case only.

Do you know how you want to cope with my contrived "xcopy /bin a b" example? The point of the example, of course, is that "/bin" looks like a real, existing POSIX path, but isn't.

From Chuck's explanation of MSYS, looks like "/b /i /n" would also get caught in their heuristics, since it apparently doesn't do file existence checks. (Else, Chuck's dumpbin example wouldn't need a workaround.)

File existence checks would fix that, but would then prevent this from doing what you want:

    $ notepad ~/tmp/newfile.txt

So, it looks like MSYS is right not to try file existence checks.

(Yes, I realize you can rewrite my xcopy example using dashes for the flags. That's beside the broader point, which is that not all things that look like POSIX paths are such.)

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]