From owner-freebsd-hackers Sat Jan 20 0:53:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rapier.smartspace.co.za (rapier.smartspace.co.za [66.8.25.34]) by hub.freebsd.org (Postfix) with SMTP id 0D13537B400 for ; Sat, 20 Jan 2001 00:53:32 -0800 (PST) Received: (qmail 6712 invoked by uid 1001); 20 Jan 2001 08:53:25 -0000 Date: Sat, 20 Jan 2001 10:53:25 +0200 From: Neil Blakey-Milner To: Matt Dillon Cc: Gerhard Sittig , Greg Black , 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> References: <20010102133239.V253@speedy.gsinet> <20010107170840.G253@speedy.gsinet> <3A5AE490.D251F590@gorean.org> <20010109124044.A16276@mithrandr.moria.org> <3A5B5656.E2AAF0B5@FreeBSD.org> <20010116192601.B253@speedy.gsinet> <20010117184854.G253@speedy.gsinet> <200101192044.f0JKinl97875@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101192044.f0JKinl97875@earth.backplane.com>; from dillon@earth.backplane.com on Fri, Jan 19, 2001 at 12:44:49PM -0800 Organization: Building Intelligence X-Operating-System: FreeBSD 4.2-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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