Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!SUN.COM!guy From: guy@SUN.COM (Guy Harris) Newsgroups: comp.sys.pyramid Subject: Re: ELM under OSx4.1 Pyramids Message-ID: <8803141816.AA25208@gorodish.sun.com> Date: 14 Mar 88 18:16:46 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 12 If someone were to do this now, I'd strongly recommending providing the choice between flock() and fcntrl(), since fcntrl() is (coincidentally) the only environment-independent locking mechanism for both SunOS and OSx. "flock()" works exactly the same in both environments in SunOS. However, it does not work over NFS in either environment; you can lock a file that's being accessed over NFS, but it will only affect processes on the machine where the "flock()" was done. "fcntl()" locking, which also works exactly the same in both environments in SunOS, uses the Lock Manager and maintains locks for a file on the server holding that file, so if you use "fcntl()" to lock a file it will affect all processes doing "fcntl()" locks on that file.