public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Setting cygdrive prefix to '/' causes disappearing mounts
@ 2000-09-15 10:30 David Condon
  2000-09-15 20:21 ` Chris Faylor
  2000-09-18 11:28 ` Kazuhiro Fujieda
  0 siblings, 2 replies; 22+ messages in thread
From: David Condon @ 2000-09-15 10:30 UTC (permalink / raw)
  To: cygwin

I have been experiencing a problem in which everything in the mount
table disappears. This happens when any program using the Cygwin DLL
is executed. With Regedit open, I can see that the keys containing the
mount points disappear.

I recreate the mount points that existed before. If I open an additional
window to the Cygwin bash without closing the first one, all mounts remain
in place.

If I start sshd as a service using SRVANY, as long as that program continues
to run, all mounts remain in place. When all programs requiring the Cygwin
DLL have been exited and nothing using the DLL is still running, the registry
keys still exist. The next time any Cygwin program is executed (not just
bash -- running any program under CMD.EXE does the same thing) all the
registry keys for the mounts immediately disappear.

This problem was apparently caused, at least in my case, by setting either a
user or system /cydrive prefix to '/'. It is 100% reproducible, and especially
interesting that even when only a user /cygdrive prefix is set to '/', all
system mounts will disappear. Now that I have a little better understanding
of how the cygdrive prefix works, I can see that there is really no good
reason to change it to '/' anyway. However, the User Guide uses this exact
command as an example (3.11, "Changing the default prefix") in the section
on "mount". It seems that it would be appropriate to change that to anything
other than '/' and add a warning that setting it to '/' causes the mount
table to be cleared.

-- 
David Condon                    |       dcondon@apk.net
Webmaster, APK Net Ltd.         |       (216) 241-7166
1621 Euclid Ave., Suite 1230    |       Fax: (216) 241-7522
Cleveland, Ohio 44115


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Setting cygdrive prefix to '/' causes disappearing mounts
@ 2000-09-18  5:29 Levin, Samuel
  0 siblings, 0 replies; 22+ messages in thread
From: Levin, Samuel @ 2000-09-18  5:29 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com'

Hi all,

I am a new cygwin user.
After installing 'Cygwin' at my Windows 2000 Professional workstation
I went through the 'Users Guide' and executed the "Well known!", as I see it
from mailing list,
command as an example (3.11, "Changing the default prefix") in the section
on "mount".
The registry settings for cygwin were cleaned.

How can I correct this problem and make cygwin working as before without
re-install?

Thank you,
/Samuel

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Setting cygdrive prefix to '/' causes disappearing mounts
@ 2000-09-19  1:11 Bernard Dautrevaux
  2000-09-19  4:22 ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Bernard Dautrevaux @ 2000-09-19  1:11 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com', cygwin; +Cc: cvinschen

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Monday, September 18, 2000 8:29 PM
> To: cygwin@sourceware.cygnus.com
> Cc: cvinschen@cygnus.com
> Subject: Re: Setting cygdrive prefix to '/' causes disappearing mounts
> 
> 
> On Tue, Sep 19, 2000 at 03:26:27AM +0900, Kazuhiro Fujieda wrote:
> >>>> On Fri, 15 Sep 2000 13:30:27 -0400 (EDT)
> >>>> David Condon <dcondon@apk.net> said:
> >
> >> I have been experiencing a problem in which everything in the mount
> >> table disappears. This happens when any program using the 
> Cygwin DLL
> >> is executed. With Regedit open, I can see that the keys 
> containing the
> >> mount points disappear.
> >
> >I've fixed this problem in the development sources.  I've
> >eliminated the code deleting mount entries of which posix paths
> >have the cygdrive prefix. This fix will appear in the next release.
> 
> Thanks very much for doing this.  It is much appreciated.
> 
> This should also be in the next snapshot.
> 

I don't really understand what's the matter exactly here; as I've
understood, the cygdrive prefix was set as "/cygdrive", so that "a:" is
available as "/cygdrive/a". Setting the cygdrive prefix as "/" should give
"a:" available as "//a", so that should *not* erase "/bin" as bin is not a
subdirectory of the virtual /<empty> subdirectory of "/" but a subdirectory
of "/" itself.

I think the matching code is wrong; what should probably be avoided is
either setting the cygdrive prefix to "", or to "/.", because then /bin
would be under cygdrive, but setting the cygdrive prefix to "/" should *not*
cause problems for "/bin"; it could however cause problems with an UNC path
to machine "X", as //X/ will try to access the local X: drive, and that's
why the convention was changed to use (user-changeable) "/cygdrive/" prefix
instead of "//".

I'm just not sure this patch will not cause new kinds of problem; I think
fixing the matching code would be better: it should check for mount points
named <cygdrive prefix>/something, not "<cygdrive prefix>something", and
avoid collapsing multiple leading "/".

Just my 2c,

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Setting cygdrive prefix to '/' causes disappearing mounts
@ 2000-09-19  5:16 Bernard Dautrevaux
  2000-09-19  6:33 ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Bernard Dautrevaux @ 2000-09-19  5:16 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com', cygwin

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Tuesday, September 19, 2000 1:21 PM
> To: 'cygwin@sources.redhat.com'; cygwin@sourceware.cygnus.com
> Subject: Re: Setting cygdrive prefix to '/' causes disappearing mounts
> 
	<skipped>
> 
> Did you actually look at the patch or are you just speculating?

I'm mainly speculating on how I would understand changing "/cygdrive" by
"/": I've always expected this to suppress "cygdrive", thus changing
"/cygdrive/a" in "//a"; I've probably read too fast when I'll see somewhere
that we can get the old, B20, behaviour, assuming it was by setting the
cygpath prefix to "/" instead of "/cygdrive".

So IIUC it's no more possible to get a: mounted on //a only (as it seems
that /cygdrive/a is still accessible as //a, or is it due to some quirk I've
done and don't remember?)

> 
> I don't know what "matching code" you are referring to but 
> the patch is
> correct.  Cygwin used to umount any directory that was a 
> subdirectory of
> a cygdrive path.  Now it doesn't.

What I've said is that, from a user point of view, to get a: mounted as /a,
I would have expected setting the cygdrive prefix to the empty string, while
setting it to "/" would have mounted a: as //a; I agree its acceptable to
mount it as "/a" when the prefix is "/", but it's counter-intuitive and I
think a some people may get fooled by this (as I was).
 
> 
> However, if you think that something is wrong with the patch, I'm sure
> that both Kazuhiro and I would both love to see a correction.

For me the patch is OK: being able to explicitely mount things under
/cygdrive (or whatever it's named) is OK; there was just a misunderstanding
on what exactly was the cygdrive prefix...

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Setting cygdrive prefix to '/' causes disappearing mounts
@ 2000-09-19  6:35 Earnie Boyd
  2000-09-19  6:46 ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Earnie Boyd @ 2000-09-19  6:35 UTC (permalink / raw)
  To: Bernard Dautrevaux, 'cygwin@sources.redhat.com', cygwin

--- Bernard Dautrevaux <Dautrevaux@microprocess.com> wrote:
> 
> For me the patch is OK: being able to explicitely mount things under
> /cygdrive (or whatever it's named) is OK; there was just a misunderstanding
> on what exactly was the cygdrive prefix...
> 

The /cygdrive "prefix" is a pseudo mount point for the unmounted devices.  IMO,
and for the reason this thread exposes, I wouldn't allow access to unmounted
devices.  This would make it more UNIX like.  However, I don't see this
changing as there are benefits to /cygdrive as well.  At the time /cygdrive was
invented I argued that the string should be /umnt to more represent what it's
intent was (besides being shorter) but that suggestion was rejected and
/cygdrive was born.

Now, /cygdrive was invented because the //d convention was getting in the way
of UNC paths.  It caused long delays if the path you referenced didn't exist
locally as you have to wait for the timeout period for each of the domain
servers you have on your network to timeout.

For those of you using the // prefix for unmounted drives I urge you to
reconsider.  Either start using /cygdrive or rename /cygdrive to something more
to your liking such as /umnt but stay away from changing it to //.

Cheers,

=====
--- < http://earniesystems.safeshopper.com > ---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
           __Minimalist GNU for Windows__
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2000-09-19  8:59 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-15 10:30 Setting cygdrive prefix to '/' causes disappearing mounts David Condon
2000-09-15 20:21 ` Chris Faylor
2000-09-15 21:11   ` David Condon
2000-09-15 21:24     ` Robert Collins
2000-09-15 21:25     ` Chris Faylor
2000-09-17 13:13       ` Kazuhiro Fujieda
2000-09-17 14:37         ` Chris Faylor
2000-09-16  4:50   ` Tim Prince
2000-09-16 15:58     ` Chris Faylor
2000-09-18 11:28 ` Kazuhiro Fujieda
2000-09-18 11:30   ` Chris Faylor
2000-09-18  5:29 Levin, Samuel
2000-09-19  1:11 Bernard Dautrevaux
2000-09-19  4:22 ` Chris Faylor
2000-09-19  7:10   ` Kazuhiro Fujieda
2000-09-19  7:30     ` Chris Faylor
2000-09-19  8:41       ` Kazuhiro Fujieda
2000-09-19  8:59         ` Chris Faylor
2000-09-19  5:16 Bernard Dautrevaux
2000-09-19  6:33 ` Chris Faylor
2000-09-19  6:35 Earnie Boyd
2000-09-19  6:46 ` Chris Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).