This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: 1.7.5: Occasional failure of CreatePipe or signal handing due to thread-unsafe code in cwdstuff::set
On Sep 14 01:12, Corinna Vinschen wrote:
> On Sep 13 19:47, John Carey wrote:
> > On Sep 11 03:30, Corinna Vinschen:
> > Anyway, it looks to me as if overwriting the path in an existing
> > VistaCwd instance would confuse RtlGetCurrentDirectory_U() and
> > probably other Win32 API functions. (It may be that the same is
> > true for the handle member; I have not tried to find that out.)
> > Cygwin should probably allocate a new VistaCwd instance,
> > as does the Win32 SetCurrentDirectory() implementation.
>
> Hmm, I'm still wondering. In theory we don't have to replace the
> directory name. We just have to InterlockedExchange the handle, since
> we only need to replace the original handle which does not allow
> sharing-for-delete with our own handle which does.
>
> All other border cases (virtual dir, directory with restricted rights)
> can be rightfully handled by setting the Win32 CWD to \\?\PIPE\ again.
>
> That's at least worth a try, isn't it?
Oh, I had thought that you wanted it for long paths
and directories with restricted rights, too.
There's one other issue: the new directory will limit deletion
very briefly, until replaced. I don't know if that will bother
people as much as the current situation.
-- John
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple