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-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-16  4:50   ` Tim Prince
  2000-09-18 11:28 ` Kazuhiro Fujieda
  1 sibling, 2 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-15 20:21 UTC (permalink / raw)
  To: cygwin

I asked Corinna to look into this as soon as she has some time.

cgf

On Fri, Sep 15, 2000 at 01:30:27PM -0400, David Condon wrote:
>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.

--
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-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-16  4:50   ` Tim Prince
  1 sibling, 2 replies; 22+ messages in thread
From: David Condon @ 2000-09-15 21:11 UTC (permalink / raw)
  To: cygwin

On Fri, 15 Sep 2000, Chris Faylor wrote:

> I asked Corinna to look into this as soon as she has some time.

Because she maintains the sshd port? Uhh, no. This report has nothing to
do with sshd per se. I simply used that as an example showing that as long
as _any_ program that loads the Cygwin DLL is still running, the mounts
remain. Quit the program and all other Cygwin programs, and the mounts
remain (as verified by checking for the keys in the registry). Start up any
Cygwin program, and now the registry keys instantly get erased (you can
watch it happen in real time by simply keeping the registry editor open and
refreshing it immediately after executing any Cygwin program)

> >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-15 21:11   ` David Condon
@ 2000-09-15 21:24     ` Robert Collins
  2000-09-15 21:25     ` Chris Faylor
  1 sibling, 0 replies; 22+ messages in thread
From: Robert Collins @ 2000-09-15 21:24 UTC (permalink / raw)
  To: David Condon, cygwin

Sysinternals has a tool called regmon which can track the registry calls
made... you might want to use that to get a blow-by-blow list of what
happens.

Rob
----- Original Message -----
From: "David Condon" <dcondon@apk.net>
To: <cygwin@sources.redhat.com>
Sent: Saturday, September 16, 2000 3:11 PM
Subject: Re: Setting cygdrive prefix to '/' causes disappearing mounts


> On Fri, 15 Sep 2000, Chris Faylor wrote:
>
> > I asked Corinna to look into this as soon as she has some time.
>
> Because she maintains the sshd port? Uhh, no. This report has nothing to
> do with sshd per se. I simply used that as an example showing that as long
> as _any_ program that loads the Cygwin DLL is still running, the mounts
> remain. Quit the program and all other Cygwin programs, and the mounts
> remain (as verified by checking for the keys in the registry). Start up
any
> Cygwin program, and now the registry keys instantly get erased (you can
> watch it happen in real time by simply keeping the registry editor open
and
> refreshing it immediately after executing any Cygwin program)
>
> > >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
>
>


--
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-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
  1 sibling, 1 reply; 22+ messages in thread
From: Chris Faylor @ 2000-09-15 21:25 UTC (permalink / raw)
  To: cygwin; +Cc: jt, fujieda

On Sat, Sep 16, 2000 at 12:11:39AM -0400, David Condon wrote:
>On Fri, 15 Sep 2000, Chris Faylor wrote:
>>I asked Corinna to look into this as soon as she has some time.
>
>Because she maintains the sshd port?  Uhh, no.

There are three people in the Cygwin group at Red Hat: Corinna, DJ, and
myself.  Corinna does *quite* a bit more than maintain the ssh port.
Off the top of my head, her other accomplishments include:

- ntsec
- chroot()
- tape handling
- raw device handling
- poll()
- /dev/random
- inetutils
- ash fixes

and probably a host of other things I should remember but don't.

She's also probably the most recent person, excluding me, to look at the
mount code.   Hmm... with the possible exception of Kazuhiro Fujieda and
Jason Tishler.

If either of them is interested in investigating this, I'm sure that Corinna
wouldn't mind.  She probably won't have time to look into this for a week
or so.

cgf

--
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-15 20:21 ` Chris Faylor
  2000-09-15 21:11   ` David Condon
@ 2000-09-16  4:50   ` Tim Prince
  2000-09-16 15:58     ` Chris Faylor
  1 sibling, 1 reply; 22+ messages in thread
From: Tim Prince @ 2000-09-16  4:50 UTC (permalink / raw)
  To: cygwin, cygwin

----- Original Message -----
From: "Chris Faylor" <cgf@cygnus.com>
To: <cygwin@sourceware.cygnus.com>
Sent: Friday, September 15, 2000 8:20 PM
Subject: Re: Setting cygdrive prefix to '/' causes disappearing mounts


> I asked Corinna to look into this as soon as she has some time.
>
> cgf
>
> On Fri, Sep 15, 2000 at 01:30:27PM -0400, David Condon wrote:
. 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.

I just found out that installing cygwin at root is a way to get dejagnu working again.  Probably it's only /usr/share which dejagnu
is not accessing through the standard mount when installed at e.g. E:\cygwin\usr\share.  I had the environment set so that 'less
$DEJAGNULIBS/runtest.exp' was displaying correctly, yet dejagnu says it doesn't exist, when cygwin is installed the recommended way.


--
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-16  4:50   ` Tim Prince
@ 2000-09-16 15:58     ` Chris Faylor
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-16 15:58 UTC (permalink / raw)
  To: cygwin

On Sat, Sep 16, 2000 at 04:53:24AM -0700, Tim Prince wrote:
>> I asked Corinna to look into this as soon as she has some time.
>>
>> cgf
>>
>> On Fri, Sep 15, 2000 at 01:30:27PM -0400, David Condon wrote:
>. 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.
>
>I just found out that installing cygwin at root is a way to get dejagnu
>working again.  Probably it's only /usr/share which dejagnu is not
>accessing through the standard mount when installed at e.g.
>E:\cygwin\usr\share.  I had the environment set so that 'less
>$DEJAGNULIBS/runtest.exp' was displaying correctly, yet dejagnu says it
>doesn't exist, when cygwin is installed the recommended way.

The dejagnu that is currently released with cygwin uses a Windows version
of TCL that doesn't understand Cygwin paths.  It's that simple.

This has nothing to do with the problem of the mount table disappearing.

cgf

--
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-15 21:25     ` Chris Faylor
@ 2000-09-17 13:13       ` Kazuhiro Fujieda
  2000-09-17 14:37         ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Kazuhiro Fujieda @ 2000-09-17 13:13 UTC (permalink / raw)
  To: cygwin

>>> On Sat, 16 Sep 2000 00:24:50 -0400
>>> Chris Faylor <cgf@cygnus.com> said:

> She's also probably the most recent person, excluding me, to look at the
> mount code.   Hmm... with the possible exception of Kazuhiro Fujieda and
> Jason Tishler.

I know the cause of this problem. `mount_info::read_mounts' can
delete all registry keys of which names include the current
cygdrive prefix.  When I rewrited the mount code sometime ago,
I noticed this logic and preserved it.

The mount code doesn't allow mount entries under the cygdrive
prefix at all. But it let us change the cygdrive prefix into a
parent directory of existing mount entries. After that, it
rejects them.

We have two alternatives to solve this problem.
1. Allow mount entries under the cygdrive prefix.
2. Keep the cygdrive prefix away from parent directories of
   existing mount entries.

I can't find possible problems triggered by the former solution.
The latter solution won't let us change the cygdrive prefix into '/'.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

--
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-17 13:13       ` Kazuhiro Fujieda
@ 2000-09-17 14:37         ` Chris Faylor
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-17 14:37 UTC (permalink / raw)
  To: cygwin

On Mon, Sep 18, 2000 at 05:11:28AM +0900, Kazuhiro Fujieda wrote:
>>>> On Sat, 16 Sep 2000 00:24:50 -0400
>>>> Chris Faylor <cgf@cygnus.com> said:
>
>> She's also probably the most recent person, excluding me, to look at the
>> mount code.   Hmm... with the possible exception of Kazuhiro Fujieda and
>> Jason Tishler.
>
>I know the cause of this problem. `mount_info::read_mounts' can
>delete all registry keys of which names include the current
>cygdrive prefix.  When I rewrited the mount code sometime ago,
>I noticed this logic and preserved it.
>
>The mount code doesn't allow mount entries under the cygdrive
>prefix at all. But it let us change the cygdrive prefix into a
>parent directory of existing mount entries. After that, it
>rejects them.
>
>We have two alternatives to solve this problem.
>1. Allow mount entries under the cygdrive prefix.

Is that to disallow remounting /cygdrive/a as something besides a:?
That doesn't seem worth it, IMO.

>2. Keep the cygdrive prefix away from parent directories of
>   existing mount entries.
>
>I can't find possible problems triggered by the former solution.
>The latter solution won't let us change the cygdrive prefix into '/'.

I think that the 1. is fine, if you're willing to change it.

cgf

--
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-15 10:30 Setting cygdrive prefix to '/' causes disappearing mounts David Condon
  2000-09-15 20:21 ` Chris Faylor
@ 2000-09-18 11:28 ` Kazuhiro Fujieda
  2000-09-18 11:30   ` Chris Faylor
  1 sibling, 1 reply; 22+ messages in thread
From: Kazuhiro Fujieda @ 2000-09-18 11:28 UTC (permalink / raw)
  To: cygwin

>>> 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.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

--
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 11:28 ` Kazuhiro Fujieda
@ 2000-09-18 11:30   ` Chris Faylor
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-18 11:30 UTC (permalink / raw)
  To: cygwin; +Cc: cvinschen

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.

cgf

--
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  8:41       ` Kazuhiro Fujieda
@ 2000-09-19  8:59         ` Chris Faylor
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-19  8:59 UTC (permalink / raw)
  To: cygwin

On Wed, Sep 20, 2000 at 12:39:36AM +0900, Kazuhiro Fujieda wrote:
>>>> On Tue, 19 Sep 2000 10:29:14 -0400
>>>> Chris Faylor <cgf@cygnus.com> said:
>
>> >I'm afraid there is a slip. As I see it, the mount logic tries
>> >the pattern matching with "<cygdrive prefix>[a-zA-Z]\(/\|$\)" at
>> >first, so /bin wouldn't be under cygdrive.
>> 
>> I don't follow.  I've actually tried this.  I set the cygdrive prefix to '/'
>> and then did a 'ls -l /bin'.  The result was my /bin directory, as expected.
>> Also, performing a 'ls -l /' showed me the expected root directory.
>
>That's right. I'm sorry the point of issue wasn't clear in my
>mail. In your previous mail, your explanation was right
>concerning the result. There was a slip in the reason of it.

Ah.  You're right.  It doesn't do a longest match first in the case of
cygdrive.  Cygwin checks for /cygdrive/[some alphabetic character]
first before scanning the mount table.

cgf

--
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  7:30     ` Chris Faylor
@ 2000-09-19  8:41       ` Kazuhiro Fujieda
  2000-09-19  8:59         ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Kazuhiro Fujieda @ 2000-09-19  8:41 UTC (permalink / raw)
  To: cygwin

>>> On Tue, 19 Sep 2000 10:29:14 -0400
>>> Chris Faylor <cgf@cygnus.com> said:

> >I'm afraid there is a slip. As I see it, the mount logic tries
> >the pattern matching with "<cygdrive prefix>[a-zA-Z]\(/\|$\)" at
> >first, so /bin wouldn't be under cygdrive.
> 
> I don't follow.  I've actually tried this.  I set the cygdrive prefix to '/'
> and then did a 'ls -l /bin'.  The result was my /bin directory, as expected.
> Also, performing a 'ls -l /' showed me the expected root directory.

That's right. I'm sorry the point of issue wasn't clear in my
mail. In your previous mail, your explanation was right
concerning the result. There was a slip in the reason of it.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

--
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  7:10   ` Kazuhiro Fujieda
@ 2000-09-19  7:30     ` Chris Faylor
  2000-09-19  8:41       ` Kazuhiro Fujieda
  0 siblings, 1 reply; 22+ messages in thread
From: Chris Faylor @ 2000-09-19  7:30 UTC (permalink / raw)
  To: cygwin

On Tue, Sep 19, 2000 at 11:08:35PM +0900, Kazuhiro Fujieda wrote:
>>>> On Tue, 19 Sep 2000 07:21:28 -0400
>>>> Chris Faylor <cgf@cygnus.com> said:
>
>> >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
>(snip)
>> That's not how it works.  That mount logic does maximum length matching,
>> so /bin is matched first.  Have you even tried this?
>
>I'm afraid there is a slip. As I see it, the mount logic tries
>the pattern matching with "<cygdrive prefix>[a-zA-Z]\(/\|$\)" at
>first, so /bin wouldn't be under cygdrive.

I don't follow.  I've actually tried this.  I set the cygdrive prefix to '/'
and then did a 'ls -l /bin'.  The result was my /bin directory, as expected.
Also, performing a 'ls -l /' showed me the expected root directory.

cgf

--
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  4:22 ` Chris Faylor
@ 2000-09-19  7:10   ` Kazuhiro Fujieda
  2000-09-19  7:30     ` Chris Faylor
  0 siblings, 1 reply; 22+ messages in thread
From: Kazuhiro Fujieda @ 2000-09-19  7:10 UTC (permalink / raw)
  To: cygwin

>>> On Tue, 19 Sep 2000 07:21:28 -0400
>>> Chris Faylor <cgf@cygnus.com> said:

> >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
(snip)
> That's not how it works.  That mount logic does maximum length matching,
> so /bin is matched first.  Have you even tried this?

I'm afraid there is a slip. As I see it, the mount logic tries
the pattern matching with "<cygdrive prefix>[a-zA-Z]\(/\|$\)" at
first, so /bin wouldn't be under cygdrive.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

--
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, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-19  6:46 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com', cygwin

On Tue, Sep 19, 2000 at 06:35:02AM -0700, Earnie Boyd wrote:
>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 //.

Just for the record, changing the cygdrive prefix to '/' does not result
in paths that begin with '//'.  Cygwin goes to great pains to ensure that it
emits a path with a '//' only when referencing a UNC path.  So, if you set
your cygdrive prefix to '/' and move to the d: drive, pwd will report /d.

If you think about it for a second, this is consistent with the way the root
directory works.  Setting the cygdrive prefix to the empty string would
imply that you could use just 'a' (no slash) to reference the a: drive.

Anyway, attempting to set the cygdrive prefix to either '' or '//' will
fail thanks to Kazuhiro's recent change.

Cygwin already allows you to use '//a' to reference the A: drive but, as Earnie
says, this usage is discouraged.

cgf

--
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

* Re: Setting cygdrive prefix to '/' causes disappearing mounts
  2000-09-19  5:16 Bernard Dautrevaux
@ 2000-09-19  6:33 ` Chris Faylor
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Faylor @ 2000-09-19  6:33 UTC (permalink / raw)
  To: cygwin

On Tue, Sep 19, 2000 at 02:07:08PM +0200, Bernard Dautrevaux wrote:
>> -----Original Message-----
>> From: Chris Faylor [ mailto:cgf@cygnus.com ]
>>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?)

//a has always been available in cygwin.  Although its use is
deprecated, it has never been removed and it has nothing to do with
/cygdrive.

>>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).

I'm not advocating that people set their /cygdrive to / and I will be
changing the example that mentions this.  However you seem to be fooled
by something that you haven't even tried.  Hopefully not too many other
people will imagine problems and refuse to empirically test them.

I characterize these kind of discussions as the "I wonder if it is
raining outside" variety.  Rather than wonder, stick your hand out of
the window and test for yourself.

Rather than speculate on what you think may be wrong, test the snapshot
and report on problems.

cgf

--
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  1:11 Bernard Dautrevaux
@ 2000-09-19  4:22 ` Chris Faylor
  2000-09-19  7:10   ` Kazuhiro Fujieda
  0 siblings, 1 reply; 22+ messages in thread
From: Chris Faylor @ 2000-09-19  4:22 UTC (permalink / raw)
  To: 'cygwin@sources.redhat.com', cygwin

On Tue, Sep 19, 2000 at 10:02:15AM +0200, Bernard Dautrevaux wrote:
>> 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.

No.  This makes a: available as /a.

>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 "//".

That's not how it works.  That mount logic does maximum length matching,
so /bin is matched first.  Have you even tried this?

>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,

Did you actually look at the patch or are you just speculating?

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.

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.

cgf

--
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-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

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).