delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/05/17:04:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 5 May 2005 17:03:03 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Dave Korn <dave DOT korn AT artimi DOT com>
cc: cygwin AT cygwin DOT com, bug-coreutils AT gnu DOT org
Subject: RE: mkdir -p and network drives
In-Reply-To: <SERRANO9tjxqxPs68K800000243@SERRANO.CAM.ARTIMI.COM>
Message-ID: <Pine.GSO.4.61.0505051659550.9005@slinky.cs.nyu.edu>
References: <SERRANO9tjxqxPs68K800000243 AT SERRANO DOT CAM DOT ARTIMI DOT COM>
MIME-Version: 1.0

On Thu, 5 May 2005, Dave Korn wrote:

> ----Original Message----
> >From: Igor Pechtchanski
> >Sent: 05 May 2005 18:20
>
> > On Thu, 5 May 2005, Paul Eggert wrote:
> >
> >> Eric Blake <ebb9 AT XXX DOT XXX> writes:
> >>
> >>> //MACHINE currently generates ENOENT, whether or not there is a
> >>> server on the network with that name, and mkdir(2), stat(2), and
> >>> chdir(2) with an argument of "//MACHINE" fail.
> >>
> >> That's certainly a hassle.  Let's not worry about going through
> >> zillions of lines of application code working around that
> >> incompatibility.  Let's get Cygwin fixed instead.
> >
> > One potential problem is that on Windows, using NetShareEnum when checking
> > the path will mean that every time someone does "mkdir -p", the command
> > will have to wait until all network shares are examined.  This could
> > result in quite a bit of a delay, to say the least...
>
>   Um, I don't see why.  You only need to check network shares at all when
> you have "//" at the start of the command line.

Umm, yes, of course, I meant "for the cases when doing 'mkdir -p' on a
network share".

> I can't see any reason why you'd want to check shares on any machine
> other than //MACHINE either, and in fact I can't see why you'd care
> about checking any share on //MACHINE other than the one specified after
> '//MACHINE/' in the command line.  Could you perhaps expond on that
> statement a bit?

Well, CGF summarized this nicely -- mkdir -p checks '//', then
'//MACHINE', and only then '//MACHINE/Share'.  Usually, if
'//MACHINE/Share' is "net use"d, the fact of its existence and
accessibility is cached.  If we added the semantics for accessing '//' and
'//MACHINE' as was suggested earlier in the thread, then '//' would try to
list all machines on the network, '//MACHINE' would try to access all
shares on a particular machine (not necessarily a fast operation), and
only then would mkdir get to '//MACHINE/Share' that is cached.

There's always Pierre's solution of doing minimal support for stat()ing
'//' and '//MACHINE', though...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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