From owner-freebsd-questions Sun Sep 16 0:25:39 2001 Delivered-To: freebsd-questions@freebsd.org Received: from groggy.anc.acsalaska.net (groggy.anc.acsalaska.net [208.151.119.232]) by hub.freebsd.org (Postfix) with ESMTP id 598A637B40A for ; Sun, 16 Sep 2001 00:25:35 -0700 (PDT) Received: (from abc@localhost) by groggy.anc.acsalaska.net (8.9.3/8.9.3) id HAA34229 for "freebsd-questions" ; Sun, 16 Sep 2001 07:25:29 GMT (envelope-from groggy@iname.com) Date: Sun, 16 Sep 2001 07:25:29 GMT From: groggy@iname.com Message-Id: <200109160725.HAA34229@groggy.anc.acsalaska.net> X-Authentication-Warning: groggy.anc.acsalaska.net: abc set sender to groggy@iname.com using -f Subject: file locking #2 X-Mailer: Umail v1.9 To: "freebsd-questions" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 4.3 FBSD. > i never got an answer to this question i posted a few weeks ago, > nd cuz it's important to some scripting i am doing, > i thought i'd try again. > > FBSD's file locking scheme changed somewhat from version 2 to version 3. in > v2 a user could open the same file on multiple terminals with RW > permissions. in v3, this could'nt be done, only the 1st instance of opening > a file would have RW permission; instances thereafter would have only R > permission. > > however with v3, server processes always have RW permission, even if the > file is currently open with in a user process with RW permission. > > it makes some sense, but i am not sure that i understand this scheme > completely, since file locking now has somewhat of a split personality. > > does it come down to this: user/interactive login shell processes only have > RW on the first instance of a file being opened, while all other processes > have RW permission always? > > also - how do one know when to use file locks in scripts - what quantity of > data is safe to write to a file with other processes possibly simultaneously > writing to the same file? > > thank you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message