Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!rutgers!princeton!allegra!rayssd!dhb
From: dhb@rayssd.UUCP
Newsgroups: news.admin
Subject: Re: rnews -U dumping core
Message-ID: <497@rayssd.RAY.COM>
Date: Mon, 22-Dec-86 01:09:08 EST
Article-I.D.: rayssd.497
Posted: Mon Dec 22 01:09:08 1986
Date-Received: Mon, 22-Dec-86 06:45:28 EST
References: <1457@lsuc.UUCP>
Sender: dhb@rayssd.RAY.COM (David H. Brierley @ Raytheon Company, Portsmouth RI)
Organization: Raytheon Company, Portsmouth RI
Lines: 29
Summary: Even worse, expire does not prevent rnews -U from running.

In article <1457@lsuc.UUCP>, dave@lsuc.UUCP (David Sherman) writes:
> Another minor annoyance: inews logging
> 	freopen(861208061971CD): No such file or directory
> a few or many times each night. It only shows up late at night, around
> the time that I suspect expire is finishing. I think what's happening is that
> expire is starting up rnews -U and it's conflicting with the one started
> from crontab. Since we start it hourly from crontab anyway,
> I've stuck an xxit(0); into expire.c just before the execl of
> rnews. I think that might solve it.

I have found an even bigger problem with the alleged interlocking between
expire and rnews.  When expire is running it locks the active file which
causes rnews to go into spooling mode (which I have defined anyway).  The
only problem is that the -U flag ignores the fact that the active file is
locked and proceeds to process the spool directory.  It is also possible
to have more than one rnews -U running since they each ignore the fact
that the active file is locked.  What I did was to make the routine that
does the unspooling attempt to create an exclusive lock on the active file
and refuse to run if the lock cannot be created.  Of course you then have
to be careful to downgrade the lock to shared or else other things will
probably cease functioning.  These changes have only been tested on 4.2BSD
and have not been mailed to Rick Adams yet, but if anyone wants them they
may have them.

-- 
David H. Brierley
Raytheon Submarine Signal Division; Portsmouth RI; (401)-847-8000 x4073
smart mailer or arpanet: dhb@rays