Rename bug?

Chuck Karish karish at denali.stanford.edu
Fri Jun 3 07:54:10 AEST 1988


2 Jun 88 21:54:10 GMT
Sender: news at labrea.Stanford.EDU
Reply-To: karish at denali.stanford.edu (Chuck Karish)
Organization: Mindcraft, Inc.
Lines: 21


    In article <5730 at chinet.UUCP> les at chinet.UUCP (Leslie Mikesell) writes:
	This leaves an interval between unlink("xx") and link("TMP4653","xx")
	when an attempt to open("xx") will fail.  I work with a system that
	has about 10,000 files on line that are mostly updated daily, some
	every 10 minutes, and it seems like a real kludge that I had to make
	the retrieval program attempt open() twice with a sleep() in between
	to be sure of finding the file.  Can it be done otherwise?

Why not have each program that uses the shared files lock them
while they're in use?  If your system doesn't support real locks,
an ad hoc advisory locking system would be adequate if the
programs were willing to cooperate with one another.




Chuck Karish	ARPA:	karish at denali.stanford.edu
		BITNET:	karish%denali at forsythe.stanford.edu
		UUCP:	{decvax,hplabs!hpda}!mindcrf!karish
		USPS:	1825 California St. #5   Mountain View, CA 94041



More information about the Comp.unix.questions mailing list