Andy Koppe
Thu Oct 8 18:11:00 GMT 2009

2009/10/8 Corinna Vinschen:
> Actually, it's not just a change, it's a bug fix.  The reason for the
> fix is that POSIX requires this behaviour.  When I debugged the luit
> problem I found that tcsh, for instance, depends on this behaviour.

I see. Thanks for explaining.

>>> This is used for a new feature in mintty-0.5: Ctrl+clicking on a file
>>> to open it via cygstart, whereby the current working directory of the
>>> foreground process is needed for relative paths. This worked fine up
>>> to 1.7.0-62, but due to the change above it no longer works on
>>> cygwin-cvs.
> I'm wondering a bit how's that supposed to work anyway.  How do you
> handle this?
>  $ pwd
>  /home/andy
>  $ ls /tmp
>  foo bar baz
> At Ctrl-click, the foreground process is the shell.  CWD is /home/andy.
> Clicking on foo, bar, or baz will not have the desired result.

True, given the text-based nature of Unix terminals, support for
relative paths has to be incomplete, but it's proving a useful
shortcut anyway. (I'll need to add feedback for when it doesn't work

I guess it could try to keep track of which working directory each
line came from. But that'd be a lot of overhead and it still wouldn't
be a complete solution due to timing issues, and because processes
don't necessarily change to the directory they're printing files from.

The tcgetgrp change will add indirectly invoked shells to the list of
things where relative paths wont work. Fortunately the default is to
invoke a shell directly.


More information about the Cygwin-developers mailing list