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: 1.7.5: Occasional failure of CreatePipe or signal handing due to thread-unsafe code in cwdstuff::set


On Sep  2 23:32, John Carey wrote:
> On Aug 12 01:11, Corinna Vinschen wrote:
> > On Aug 12 06:54, Andy Koppe wrote:
> > > On 11 August 2010 20:55, John Carey wrote:
> > > > So is your idea that if SetCurrentDirectory() fails because
> > > > of path length or permissions, then Cygwin would just accept
> > > > the failure and keep an internal record the
> > > > POSIX current working directory and use that for all
> > > > Cygwin calls, not the Win32 notion of current directory?
> > >
> > > Yes. The question then becomes what to do about the Win32 working
> > > directory in that case.
> > 
> > Actually, Cygwin accepts *any* directory it can open as CWD:
> > 
> > - Directories which can only be opened under SE_BACKUP_NAME.
> > - Directories with a length up to 32768 chars.
> > - Virtual directories, which don't exist at all as filesystem-based
> >   paths, like /proc, /cygdrive, etc.
> > 
> 
> In Aug 17 10:15, Corinna Vinschen wrote:
> > I just released 1.7.6-1.
> ...
> > What changed since Cygwin 1.7.5:
> > ================================
> > 
> > - Cygwin handles the current working directory entirely on its own.  The
> >   Win32 current working directory is set to an invalid path to be out of
> >   the way.  This affects calls to the Win32 file API (CreateFile, etc.).
> >   See http://cygwin.com/htdocs/cygwin-ug-net/using.html#pathnames-win32-api
> 
> Thank you very much for the fix!
> 
> I've been running tests against Cygwin 1.7.6, and then 1.7.7,
> and those sporadic, non-deterministic failures in CreatePipe
> did stop after the 1.7.6 upgrade, and are still gone in 1.7.7.
> I think it's been long enough to conclude that it is not just
> the non-determinism--it really is fixed, as expected.
> 
> I understand that this issue opened a can of worms;
> thanks again for your efforts to overcome those difficulties.

I still don't like the final workaround, which is, to set the Win32 CWD
to the Cygwin CWD.  It would be nice if we could revert that change to
the pre-1.7.6 behaviour in a Vista-friendly way.  If you ever find out
how to make sure that the new handle in the PEB's user parameter block
is used even on Vista and later, pray tell me. 


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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


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