Subject: Re: port-sun3/4511: savecore will save old dumps repeatedly...
To: None <woods@planix.com>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: netbsd-bugs
Date: 11/18/1997 15:24:59
> A normal and successful system halt should also probably wipe out any dump
> magic number to prevent a savecore upon reboot.
It is supposed to. I've looked at the replies that you made to the
PR, and your analysis of what the -c flag does seems incorrect (if i'm
reading it correctly 8-).
if -c is specified, savecore _only_ clears the dump's magic number (by
calling clear_dump()).
If -c is not specified, savecore does:
if (!dump_exists() && !force)
exit(1);
check_kmem();
if (panicstr)
syslog(LOG_ALERT, "reboot after panic: %s", panic_mesg);
else
syslog(LOG_ALERT, "reboot");
if ((!get_crashtime() || !check_space()) && !force)
exit(1);
save_core();
clear_dump();
exit(0);
Note that on error conditions, save_core() or other functions might
exit before the dump is cleared. However, in the case that the core
is successfully saved, it should be cleared by clear_dump().
If it is re-saving after a successful dump, I can't see why that would
be (if -c works to clear the dump).
cgd