X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 12 Aug 2010 10:11:51 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.5: Occasional failure of CreatePipe or signal handing due to 	thread-unsafe code in cwdstuff::set
Message-ID: <20100812081151.GT14202@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <3C031C390CBF1E4A8CE1F74DE7ECAF3A140684F0AA@MBX8.EXCHPROD.USA.NET> <20100811084926.GC26152@calimero.vinschen.de> <3C031C390CBF1E4A8CE1F74DE7ECAF3A140684F0B0@MBX8.EXCHPROD.USA.NET> <AANLkTimpBCKzUioEarGiKMQbTjN+6s9iDYm_zzZ2Lxr9@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimpBCKzUioEarGiKMQbTjN+6s9iDYm_zzZ2Lxr9@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Aug 12 06:54, Andy Koppe wrote:
> On 11 August 2010 20:55, John Carey wrote:
> > On Aug 11 01:49 Corinna Vinschen wrote:
> >> there's no Win32-safe way to set a new
> >> directory handle as cwd in Vista and later anymore.  Since there's no
> >> official API to set the cwd using a directory handle, there's no way to
> >> set the Win32 cwd to a directory with restricted permissions.
> >> This *is* frustrating.
> >>
> >> I'll look into another solution.  Probably we will have to call
> >> SetCurrentDirectory again and ignore any error.  I don't accept the
> >> aforementioned restriction for POSIX calls.
> >
> > 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.

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

