Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site dartvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!dartvax!chuck
From: chuck@dartvax.UUCP (Chuck Simmons)
Newsgroups: net.arch
Subject: Re: RMS v/s UNIX (non-religious)
Message-ID: <2814@dartvax.UUCP>
Date: Fri, 8-Mar-85 07:19:31 EST
Article-I.D.: dartvax.2814
Posted: Fri Mar  8 07:19:31 1985
Date-Received: Sun, 10-Mar-85 06:17:27 EST
References: <917@sjuvax.UUCP> <538@rlgvax.UUCP>, <2799@dartvax.UUCP> <5178@utzoo.UUCP>
Organization: Dartmouth College, Hanover, NH
Lines: 30

> > As a miniumum, by default if one process has a file open with write 
> > permission no other process should be able to read or write that file.
> 
> Of course, this means that (for example) you can't read a log file as
> it is being produced to watch what's happening.
> -- 
> 				Henry Spencer @ U of Toronto Zoology

Actually...  I guess I never mentioned 'append' permission.  'write'
permission let's you modify the contents of a file, but not make it
longer.  'append' permission allows you to make a file longer, but
not change the contents of the file.  There is no reason why one process
could not have a file open with 'read' while another process has the file
open with 'append' since the processes will not be conflicting.  This
is just one answer.

The other answer is that we make the log file a 'sharable' file.  Then
the logging process can periodically lock the file, write out (er, append)
a buffer's worth of information to the file, and then unlock the file.  
The reading process well do similar things, but it will read instead
of append.  Of course, this means you have to have a lock-queuing
mechanism implemented.  And you have to know in advance that the file
is sharable.

A more interesting problem is:  how will the reading process know when
information has been appended to the logfile?  Naturally it could 'poll',
but it would be much nicer if it could get an interrupt whenever the
logging process had made the file longer.

chuck_simmons%d1@dartvax