Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2012 00:00:58 -0700
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib
Message-ID:  <507D062A.8060109@FreeBSD.org>
In-Reply-To: <1350333885.1123.153.camel@revolution.hippie.lan>
References:  <201210150821.q9F8Lobc047576@svn.freebsd.org> <20121015202615.GJ1383@garage.freebsd.pl> <1350333885.1123.153.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?507D062A.8060109>