Date: Sun, 9 Sep 2001 20:17:04 GMT From: groggy@iname.com To: "freebsd-questions" <questions@freebsd.org> Subject: file locking Message-ID: <200109092017.UAA13372@groggy.anc.acsalaska.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109092017.UAA13372>