[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Shared file



What do you mean by "shared"?  Unless you take special measures,
all files are opened in shared mode.  You have to explicitly
lock them if you don't want shared access.  For example, use 2
consoles (or xterms) and do
	cat - > share.txt
in the first window and do
	tail -f share.txt
in the second window.  Now type in the first window and see it
show up in the second window.  There is some buffering going on
so it might take a while to get a block of text out.  On my
system cat seems to be buffered by line when reading from stdin.
That's going to vary from application to application.

(actually, the read on stdin flushes the write on stdout.)

jim


----------
From: 	ivan@cerebro.inf.ufpr.br[SMTP:ivan@cerebro.inf.ufpr.br]
Sent: 	Friday, October 02, 1998 6:02 AM
To: 	debian-user@lists.debian.org
Cc: 	The recipient's address is unknown.
Subject: 	Shared file

Hi, all

   I would like to know how can I creat and
handle a file that can be shared by more than
one process at the same time in Debian. I got
it working in AIX, but in Linux's open system call
there's no option to do this. 
Thanks in advance. 


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null



Reply to: