delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/02/17:20:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 2 Feb 2011 23:19:58 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: Ralf Wildenhues <Ralf DOT Wildenhues AT gmx DOT de>
Subject: Re: directories named '...' (dotdotdot) do not work
Message-ID: <20110202221958.GT2675@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, Ralf Wildenhues <Ralf DOT Wildenhues AT gmx DOT de>
References: <loom DOT 20110201T203452-177 AT post DOT gmane DOT org> <20110202204556 DOT GL2675 AT calimero DOT vinschen DOT de> <4D49C4EB DOT 70204 AT redhat DOT com> <20110202212846 DOT GN2675 AT calimero DOT vinschen DOT de> <20110202215346 DOT GQ2675 AT calimero DOT vinschen DOT de> <4D49D434 DOT 7050009 AT redhat DOT com> <20110202221139 DOT GS2675 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20110202221139.GS2675@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Feb  2 23:11, Corinna Vinschen wrote:
> On Feb  2 15:01, Eric Blake wrote:
> > On 02/02/2011 02:53 PM, Corinna Vinschen wrote:
> > > [...]
> > > To fix that, we would have to scan the entire path for path components
> > > which contain leading spaces or trailing dots or spaces.  That makes
> > > fork even slower than it already is.
> > 
> > Well, that would only be if the path is shorter than MAX_PATH (256)
> > bytes, so it's not like we have a quadratic scaling problem over
> > thousands of bytes.  Furthermore, using a directory literally named
> > '...' already causes problems for windows programs that ar not long-path
> > aware, so the workaround is no worse than what they currently get from
> > such a path.  But you're right, that taking the time to scan for any
> > occurrence of:
> > 
> > '.\', './', '/.', ' \', ' /'
> > 
> > and checking for five patterns across 256 bytes definitely adds time.
> > 
> > > Given that it works fine on Vista and Windows 7 anyway, is it really
> > > worth to add this extra code just to support an old OS in a very rare
> > > situation?  
> > 
> > Can't we make the scan conditional on the windows version?  That is,
> > spend the extra time to keep XP happy, but skip the scan on newer Windows?
> 
> I'm not opposed to a pre-Vista workaround.  The code should be added to
> the "if (runpath)" code starting at line 494 in spawn.cc.  If you have
> an idea how to do this test as fast as possible, please send a patch.

Oh, btw., only three patterns.  At this point in the code the slashes
are already converted to backslashes.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019