Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!apollo!rees From: rees@apollo.UUCP Newsgroups: news.software.b Subject: Active file locking bug Message-ID: <339e9797.982f@apollo.uucp> Date: Thu, 12-Mar-87 09:30:00 EST Article-I.D.: apollo.339e9797.982f Posted: Thu Mar 12 09:30:00 1987 Date-Received: Fri, 13-Mar-87 20:56:49 EST Organization: Apollo Computer, Chelmsford, Mass. Lines: 13 With 1800 nodes all running news out of the same lib and spool, we tend to uncover a lot of bugs in the news locking code. The newgroup code in control.c does not lock the active file when it adds a new newsgroup to the file. The fix is to lock() before the loop that reads the file, and unlock() on every exit from c_newgroup. We use read-intend-write locks to improve concurrency, which standard Unix doesn't have, so I can't just pass on our diffs. I only have to lock() while the write is actually taking place. Without this fix, you get mass confusion if two newgroups come in at the same time.