[news.software.b] Active file locking bug

rees@apollo.UUCP (03/12/87)

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.