how to unscrew yourself after vnews core dumps

Andy Tannenbaum trb at masscomp.UUCP
Sat May 26 13:39:00 AEST 1984


On our VAX 750 4.1C, vnews core dumps when you type crap to the N command
and try to break out with INTR.  I haven't investigated the bug cuz the
sources aren't lying around here, but if ever you get booted out of
vnews with a core dump after a few hours and you want to recover your
.newsrc, here's how to do it!  (Welcome to kludge of the century.)

Key thing is that the .newsrc lines are stored in core in the same
format that they're stored on disk.

First, get the useful strings out of the core image:

% strings core | see > foo

"Strings" gets printable ascii strings out of a file.
Fine piece of work, comes with 4bsd.
"See" makes sure that you can vi the file.
See is cat -v, I didn't want ickey!rob to complain.

Now, edit the file and look for the string:

	net.general:

(Assuming you read net.general).  

Make sure you put the colon after!  There is an area that looks like a
.newsrc but with no colons, I suspect it's a list of "last article in
newsgroup" or something.  Don't be fooled by cheap substitutes, demand
the colon!

Now, walk backward to what looks like the top of the .newsrc file, and
delete the cruft before it.  Walk to what looks like the end and delete
the cruft after.  You might have some short lines of garbage characters
within the .newsrc data, delete those lines, it's ok.  What's left
should have the same number of lines as your old .newsrc (check with
wc).  Diff them and eyeball them, I think you'll find that you've
regenerated your .newsrc.

(I just figured this out after just having spent a good deal of time
reading news and then getting booted out.)

If this comes in handy, good.  If not, I hope you at least find it
amusing.

	Andy Tannenbaum   Masscomp Inc  Westford MA   (617) 692-6200 x274



More information about the Net.bugs mailing list