Path: utzoo!attcan!uunet!mcsun!hp4nl!nikhefh!e07 From: e07@nikhefh.nikhef.nl (Eric Wassenaar) Newsgroups: comp.sys.apollo Subject: Unix file locking problems Message-ID: <948@nikhefh.nikhef.nl> Date: 11 Jul 90 15:12:21 GMT Sender: e07@nikhef.nl (Eric Wassenaar) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 29 A Unix application that requires regulated access from several processes to one and the same file, may not run safely on Apollo. A usual method to grant exclusive access is to follow an open() by a flock() but this does not work on Apollo because 1. flock() only works when used from processes running on the same node. 2. you cannot open() a file (not even readonly) that is currently opened for write on another node. The open() fails with ETXTBSY. This makes it difficult to port such applications to Apollo without major re-writes. An obvious example is the electronic mail, which suffers from the above behaviour, and cannot be trusted to work reliably on Apollo. You have to adapt all mail utilities such as /usr/lib/sendmail, /bin/mail, /usr/ucb/mail, /usr/ucb/from, mush, etc. (Another example is the usenet news facility, with multiple access to the active file. This package was adapted by Jim Rees, I believe.) Does someone know a solution to solve this problem in general (without replacing unix system calls with aegis system calls everywhere) ? Or is this a fundamental portability difficulty ? Eric Wassenaar -- Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands Phone: +31 20 592 0412, Home: +31 20 909449, Telefax: +31 20 592 5155 Internet: e07@nikhef.nl