From owner-freebsd-questions Sun Sep 9 13:17: 9 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 82B5637B407 for ; Sun, 9 Sep 2001 13:17:05 -0700 (PDT) Received: (from abc@localhost) by groggy.anc.acsalaska.net (8.9.3/8.9.3) id UAA13372 for "freebsd-questions" ; Sun, 9 Sep 2001 20:17:04 GMT (envelope-from groggy@iname.com) Date: Sun, 9 Sep 2001 20:17:04 GMT From: groggy@iname.com Message-Id: <200109092017.UAA13372@groggy.anc.acsalaska.net> X-Authentication-Warning: groggy.anc.acsalaska.net: abc set sender to groggy@iname.com using -f Subject: file locking X-Mailer: Umail v1.7 (FreeBSD) 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 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