[comp.sys.amiga] Peeking at busy files

hobie@sq.uucp (Hobie Orris) (01/22/88)

	I have a small `tail' program to which I would like to add the magical
`-f' option. This waits while new lines are added to the file and shows them as
they are being added.  Now I know that while I am kermiting something, it has a
zero size in the directory and you get a `file in use' type of error if you try
to look at it.  Is there any way to gain read access to a file that is being 
written to by another process?

 Hobie Orris			| "I'm checking out of this bourgeois motel -
 guest of SoftQuad Inc. Toronto	| Push myself away from the dinner table and say
 utzoo!sq!hobie			| NO MORE JELLO FOR ME, MOM!"

dillon@CORY.BERKELEY.EDU (Matt Dillon) (01/23/88)

>	I have a small `tail' program to which I would like to add the magical
>`-f' option. This waits while new lines are added to the file and shows them as
>they are being added.  Now I know that while I am kermiting something, it has a
>zero size in the directory and you get a `file in use' type of error if you try
>to look at it.  Is there any way to gain read access to a file that is being 
>written to by another process?

	Yes, but the other process must have openned the file with modes
1005.  Most people open the file with 1006 (to create the file).  If you
open a file with modes 1005 you can still write to it, and other processes
can read from it (or also write to it) simultaniously.

				-Matt