New Code! (“whoops, it’s not supposed to do that” edition)
Cron has been rolled up to version 0.9.1 with the correction of a minor little buglet in the way I handle syslog
output. The minor bug is that when
cron
started, it did an openlog()
and proceeded along after that assuming
that the syslog connection would be forever valid. Well, this might be the
plan, but if I ever do a /etc/rc.d/init.d/logging restart
, syslogd
gets
stopped and restarted and thus the old connections to syslog now point off into
never-there-was. Which means that anyone (like, um, cron
) who wants to write to the old syslog connection just freeze up and die when they attempt to syslog something.
Cron writes a syslog message describing what it’s about to do whenever it runs a job. Or, in the case of the .../logging restart
mentioned above, it locks up and freezes when it attempts to run a job.
Ooops.
The bugfix is to simply wrap all syslog output with openlog()
… closelog()
, and now if syslogd
goes away the next output will connect to the right place.
So, New Code!, and it’s code that you might want if you’d like your copy of cron to actually cron along for the whole uptime of your machine.