[net.unix] Readnews and signals....

wall@ucbvax.UUCP (05/19/84)

I was reading news tonight on a remote machine when
my home machine crashed, and when I started Readnews
up after a reboot I noticed my .newsrc file wasn't 
updated (a *real* pain if you've just read a bunch of mail).

Does anyone know why Readnews doesn't seem to handle
this situation very gracefully? I'm sure that it traps
most signals, but a SIGHUP (?) doesn't seem to be handled
well.

Any insight is appreciated....

Steve
ucbvax!ucbarpa!wall
wall@ucbarpa

mike@BRL-TGR.ARPA (05/22/84)

From:      Mike Muuss <mike@BRL-TGR.ARPA>

Actually your problem is harder than catching SIGHUP.

The authors of the 4.2 BSD TELNET Daemon (/etc/telnetd)
send a KILL signal to the process group of the pseudo-tty
when the connection closes, just moments after the processes
get SIGHUP'ed.  This almost assures you of incorrect .newsrc, etc,
files -- just enough time to creat(), then Blam!

If I knew just what this was supposed to fix I'd start thinking
about taking it out...

	-Mike Muuss

geoff@utcsstat.UUCP (Geoff Collyer) (05/23/84)

Readnews actually catches SIGHUP (a hangup signal) and last time I
tried it, it updated my .newsrc (which was a real pain since I was
planning to type x to get out without update).  Readnews might still be
susceptible to multiple hangups in rapid succession (depending upon
your kernel's treatment of signals), or perhaps was hit by a SIGKILL
due to 4.2BSD's rlogin.

Readnews is far too cavalier about rewriting .newsrc and has trashed
enough .newsrc's that I copy my .newsrc to a backup file before I read news.

Don't confuse B news with production software.  Remember, B news is Bad news.

jerryp@tektronix.UUCP (Jerry Peek) (05/29/84)

------
Our version of "readnews" has a -u option.  It updates the .newsrc file
at the end of each newsgroup read, or every five minutes, whichever is
longer.

--Jerry Peek, UNIX Training Instructor, Tektronix, Inc.
US Mail:   MS 76-036, P.O. Box 500, Beaverton, OR 97077
uucp:      {allegra,decvax,hplabs,ihnp4,mit-eddie,ucbvax}!tektronix!jerryp
CSnet:     jerryp@tek
ARPAnet:   jerryp.tek@csnet-relay
Phone:     503/627-1603