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 12 11:51, Christopher Faylor wrote:
> On Thu, Aug 12, 2010 at 04:48:48PM +0200, Corinna Vinschen wrote:
> >On Aug 12 16:38, Corinna Vinschen wrote:
> >> On Aug 12 10:12, Christopher Faylor wrote:
> >> > I've done some googling but I can't find an answer to this: Is it
> >> > possible to create a directory which can't be written to - even by a
> >> > privileged user?
> >> 
> >> No.  I never came across a directory which is not writable under
> >> SE_BACKUP_NAME conditions.
> >
> >What if we create a subdirectory like C:/cygwin/.for_win32_only
> >for exactly this one single purpose, to redirect any relative
> >Win32 calls there?
> 
> I guess that would be an acceptable compromise if the below doesn't past
> muster:
> 
> On XP, at least, we could set the current directory to '//?/PIPE'.
> That causes CreateFile to fail.  I used the program below to test
> that.
> 
>   sh-3.2$ ./setdir '//?/PIPE'
>   SetCurrentDirectory succeeded
>   CreateFile failed, 123
> 
> I'll try that on other systems to see if it still behaves predictably.

Works fine on W7 if you specify \\?\PIPE\, with the trailing backslash.
Without trailing backslash it fails:

 $ ./setdir '\\?\PIPE'
 SetCurrentDirectory faile, 123

 $ ./setdir '\\?\PIPE\'
 CreateFile failed, 2

That sounds like a neat solution.  I would never have expected that
SetCurrentDirectory works for the pipe FS.


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]