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


On Aug 11 17:17, Corinna Vinschen wrote:
> On Aug 11 16:07, Andy Koppe wrote:
> > On 11 August 2010 15:50, Corinna Vinschen wrote:
> > >> > Â3) If SetCurrentDirectory fails, call
> > >> >
> > >> > Â Â Â SetCurrentDirectory (GetSystemDirectory ())
> > >> >
> > >> > Â ÂThat's basically what CMD.EXE does if it can't handle the current
> > >> > Â ÂCWD at startup. ÂYou can easily test that by setting the CWD to a
> > >> > Â Ânetwork UNC path and start CMD.EXE.
> > >> >
> > >> > I think option 3) is what we should use, but I'm open to other
> > >> > suggestions.
> > >>
> > >> I agree with approach 3, but could we send it somewhere safer? Ideally
> > >> somewhere that isn't writable. I'm concerned about the damage that a
> > >> process that thinks it's elsewhere could do to the system32 directory.
> > >
> > > Where is "somewhere safer"? ÂI mean, even CMD.EXE uses it as fallback.
> > > What about Cygwin's root dir?
> > 
> > GetTempPath()?
> 
> Good idea!

Erm... hang on.  The GetTempPath function uses what it finds in the
environment.  Since the Win32 environment in a Cygwin application
is crippled, the function will always return "C:\Windows\".

Maybe we should use Cygwin's /tmp, but that requires another path
conversion which I'd rather avoid in chdir...


Corinna

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


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