svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib
Maxim Sobolev
sobomax at FreeBSD.org
Tue Oct 16 07:01:06 UTC 2012
On 10/15/2012 1:44 PM, Ian Lepore wrote:
> It appears to, which I don't think is a bad thing at all. But the way
> it waits is to wake up, do some work, and go back to sleep for an
> integer 1 second. That will occasionally lead to a second in which no
> wakeup happens, as the "do some work" part always takes some fraction of
> a second.
Right, I will look into it.
I believe the reason why we cannot "sleep until the next event" is that
time can go back and forth in the meantime (e.g. ntpd / ntpdate), so
that amount you think you can sleep can change while you are already
sleeping. It should not be that hard to change it to wake up every 60
seconds if there is no per-second activity planned.
Also I think some more logic necessary to ignore seconds in comparison,
unless it's "every x seconds" job. Otherwise we might loose job set up
for 00:00:00 by waking up say 00:00:00:01, not at 00:00:00:00 due to
paging, network latency (e.g. running off nfs), etc.
-Maxim
More information about the svn-src-all
mailing list