Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2001 10:53:25 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Gerhard Sittig <Gerhard.Sittig@gmx.net>, Greg Black <gjb@gbch.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: how to test out cron.c changes? (was: cvs commit: src/etc crontab)
Message-ID:  <20010120105325.A5647@rapier.smartspace.co.za>
In-Reply-To: <200101192044.f0JKinl97875@earth.backplane.com>; from dillon@earth.backplane.com on Fri, Jan 19, 2001 at 12:44:49PM -0800
References:  <20010102133239.V253@speedy.gsinet> <20010107170840.G253@speedy.gsinet> <3A5AE490.D251F590@gorean.org> <20010109124044.A16276@mithrandr.moria.org> <3A5B5656.E2AAF0B5@FreeBSD.org> <nospam-3a5b95e412011c9@maxim.gbch.net> <20010116192601.B253@speedy.gsinet> <nospam-3a64b2731814449@maxim.gbch.net> <20010117184854.G253@speedy.gsinet> <200101192044.f0JKinl97875@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri 2001-01-19 (12:44), Matt Dillon wrote:
> :I'm just editing the PR with the cron patches to "catch up" with
> :OpenBSD in this respect (stating that it doesn't handle DST, but
> :has benefits whenever one's clock is jumping or cron waking up
> :too late and _could_ be extended to handle DST).  Therein I
> :suggest to
> :- not touch current cron at all but switch to a different
> :  executable by means of the newly introduced rc.conf variables
> :  or to
> :- modify cron but make the new code optional while defaulting to
> :  off
> :(in this order).  Although I cannot say which variant will happen
> :driven by those with enough priviledges to decide and commit.  As
> :well as I cannot even tell you if something will be done at all
> :in the near future regarding the fact that there's no DST
> :solution available yet -- which was the actual reason for the
> :wish to change something.
> :
> :virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
> :Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
> 
>     In the second suggestion, I presume turned off by default
>     but can be turned on with a command-line option?  (Verses
>     a make.conf compile-time variable).  I like the idea of
>     a command-line option to turn on the 'new' code.  That provides
>     a consistent, straightforward way of allowing developers to test
>     the code, making it available in releases with a simple rc.conf
>     twitch, and eventually (years later judging by the flame war:-))
>     turning it on in /etc/defaults/rc.conf.

There seems not to be a real argument against the algorithm, plenty of
support for having it available as an option, and only an argument
against it being default.  I'm quite happy for it not to be default, as
I'm sure Gerhard is.

Thus, there's no reason not to add the ability (at least OpenBSD, Debian
and HP-UX have similar behaviour), so we should proceed.  All we need do
is add the option to getopt, and turn the "optimisation check for the
default 1 minute case" to check if the "new behaviour flag" is not
checked.  Ie:

	if (!bflag || (timeDiff == 1)) {
		virtualTime = timeRunning;
		find_jobs(virtualTime, &database, TRUE, TRUE);
	} else {
		wakeupKind = -1;
		if (timeDiff > -(3*MINUTE_COUNT))
		wakeupKind = 0;
		...

It should work exactly like the old cron behaviour, unless the '-b' flag
is given.

Neil
-- 
Neil Blakey-Milner
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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