From: Mark Lawrence (mark_at_holderbank.com)
Date: Mon 11 Aug 2003 - 08:56:17 BST
On Sat, 9 Aug 2003, Herbert Pötzl wrote:
> > For this case, it might be useful that linking from any context to a file
> > in a special context (say context 1) _is_ allowed, but invokes a
> > copy-on-write function when the context attempts to write to the file.
>
> okay, so basically except from unification, which would/should
> change the files back to context zero/one links to/from
> another context should be considered not doable/accessible at
> all. correct me if that's not what you meant.
I don't quite understand your sentence here, so here is the long version
of my meaning (:
1. Cross-context linking is only possible from any context to files in
context 1.
2. When using open(2) with O_TRUNC|O_CREAT|O_APPEND on a cross-context
link, the link should be removed and the original file copied to the
context file space. The file descriptor returned from the open(2) call
should then point to this new file.
How you do 2. is not a simple matter I guess. Some sort of userspace
helper?
Cheers, Mark.
-- Mark Lawrence mark_at_holderbank.com