9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] bind -c[ab] -- what am I doing wrong?
Date: Thu, 17 Jul 2003 11:10:08 -0600	[thread overview]
Message-ID: <Pine.LNX.4.44.0307171109360.7478-100000@fbsd.cpsc.ucalgary.ca> (raw)
In-Reply-To: <3F16E003.3040806@ameritech.net>

On Thu, 17 Jul 2003, northern snowfall wrote:

>
> Hope that helps!
>

well, it doesn't. what you describe is the bahaviour of the command
according to the  man page. but here's what I observe:

	plan9% touch kern/test			# clearly I can write to it
	plan9% rm kern/test
	plan9% bind -ac /sys kern
	plan9% touch kern/test			# but not anymore
	touch: kern/test: cannot create: permission denied
	plan9%
	plan9% unmount kern
	plan9% bind -ac kern /sys
	plan9% touch /sys/blah			# this works as expected
	plan9%

given the man page i expect 'bind -ac new /something/i/can/write/to' to
allow me to continue to write to '/something/i/can/write/to'.

in fact, I expect to be able to write to '/something/i/can/write/to'
irregardless of whether it corresponds to 'new', 'old', is bound before or
bound after a directory. the only case when I wouldn't expect to be able to
write to it is when I'm not able to walk to it because of a bind -b earlier
in the walk.

in functional languages this technique is used as a formal proof of
a program's correctness, observe this example from the haskell prelude:

    -- Minimal complete definition: (==) or (/=)
    x == y      = not (x/=y)
    x /= y      = not (x==y)

a similar definition for 'bind' would be:

    bind -cb new old == bind -ca old new

where, of course, we consider only the resulting directory, and not the path
to it.

andrey








  reply	other threads:[~2003-07-17 17:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17 16:13 andrey mirtchovski
2003-07-17 17:42 ` northern snowfall
2003-07-17 17:10   ` andrey mirtchovski [this message]
2003-07-17 17:18     ` boyd, rounin
2003-07-17 17:34       ` andrey mirtchovski
2003-07-17 17:37         ` David Presotto
2003-07-17 17:45         ` boyd, rounin
2003-07-17 18:07           ` andrey mirtchovski
2003-07-17 19:29             ` [9fans] Laptop and VM software vdharani
2003-07-17 18:34               ` jmk
2003-07-18  4:21                 ` Adrian Tritschler
2003-07-18  9:07                   ` vdharani
2003-07-18  8:24                     ` Adrian Tritschler
2003-07-18 11:52                   ` C H Forsyth
2003-07-19 17:28                 ` Russ Cox
2003-07-17 17:35       ` [9fans] bind -c[ab] -- what am I doing wrong? David Presotto
2003-07-17 17:30 Richard C Bilson
2003-07-17 20:09 northern snowfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0307171109360.7478-100000@fbsd.cpsc.ucalgary.ca \
    --to=mirtchov@cpsc.ucalgary.ca \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).