This is the mail archive of the cygwin-developers 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: Cygwin CWD vs. Win32 CWD (was Re: [ANNOUNCEMENT] Updated: vim-7.3.003-1)


On 25 August 2010 12:46, Corinna Vinschen wrote:
> I have created a patch which implements both, a /usr/lib/winsynccwd.o
> which you can link against, and a new environment setting CYGWIN=winsynccwd.
>
> To implement this as configurable as possible, I changed the new
> cygwin_internal (CW_SYNC_WINCWD) functionality to take an additional
> parameter:
>
> Âcygwin_internal (CW_SYNC_WINCWD, 0)
>
> Â Â Â ÂUncouple Win32 CWD from Cygwin CWD and immediately set
> Â Â Â ÂWin32 CWD back to \\?\PIPE.
>
> Âcygwin_internal (CW_SYNC_WINCWD, 1)
>
> Â Â Â ÂUncouple Win32 CWD from Cygwin CWD, but immediately set the
> Â Â Â ÂWin32 CWD exactly once to the Cygwin CWD.
>
> Â Â Â ÂThis is practically identical to the former simple
> Â Â Â Âcygwin_internal (CW_SYNC_WINCWD) implementation.
>
> Âcygwin_internal (CW_SYNC_WINCWD, 2)
>
> Â Â Â ÂCouple Win32 CWD Âto Cygwin CWD and immediately set
> Â Â Â Âthe Win32 CWD to the Cygwn CWD.
>
> Â Â Â ÂEvery chdir() call will keep the Win32 CWD in sync with the
> Â Â Â ÂCygwin CWD now, unless the Cygwin CWD is an invalid CWD for
> Â Â Â ÂWin32, in which case it will set the Win32 CWD to \\?\PIPE.
>
> Usage of the new CYGWIN setting "winsynccwd":
>
> Â CYGWIN="nowinsynccwd" ==> cygwin_internal (CW_SYNC_WINCWD, 0)
> Â CYGWIN="winsynccwd" Â ==> cygwin_internal (CW_SYNC_WINCWD, 2)
> Â CYGWIN="winsynccwd:X" ==> cygwin_internal (CW_SYNC_WINCWD, X)
>
> Linking against /usr/lib/winsynccwd.o is equivalent to
>
> Âcygwin_internal (CW_SYNC_WINCWD, 2)
>
> Please see the patch below. ÂComments are highly welcome.

Given option 2, I think option 1 is unnecessary.

> Alternatively
> we just drop the entire jumble and keep the Win32 always in sync.

I vote for that, while keeping the patch somewhere safe in case the
inability to delete working directories causes actual problems.

Andy


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