From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 19:53:46 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 318421065675 for ; Sat, 26 Nov 2011 19:53:46 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id B31D48FC1D for ; Sat, 26 Nov 2011 19:53:45 +0000 (UTC) Received: by wwe5 with SMTP id 5so4187982wwe.31 for ; Sat, 26 Nov 2011 11:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=QkQa25RBo6/608lt32ez0eUtJwPZQTAnbv+q2jwlFzI=; b=MlziwgF5bv3aLqZ3K1DBppXIYx5pY4DBaEEz+nNjUgA4AyN5n4ASRQNHVSfDPu9hYu 1NdTLBCiclZXUW1Y2rZ/CIR5ZqlP0V2+7A84WV8aZSRID4ncbO6SkLQ3EU/rb/4vdFAG s907porplabcS/OE+KPJhJZ535dhJQJX6zsIo= Received: by 10.180.103.131 with SMTP id fw3mr39012597wib.57.1322337224378; Sat, 26 Nov 2011 11:53:44 -0800 (PST) Received: from DataIX.net (ppp-21.232.dialinfree.com. [209.172.21.232]) by mx.google.com with ESMTPS id y3sm12356618wiy.3.2011.11.26.11.53.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Nov 2011 11:53:43 -0800 (PST) Sender: Jason Hellenthal Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id pAQJrYNR003626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Nov 2011 14:53:34 -0500 (EST) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id pAQJr53W003620; Sat, 26 Nov 2011 14:53:05 -0500 (EST) (envelope-from jhell@DataIX.net) Date: Sat, 26 Nov 2011 14:53:05 -0500 From: Jason Hellenthal To: Dieter BSD Message-ID: <20111126195305.GC2368@DataIX.net> References: <20111125175344.233450@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H8ygTp4AXg6deix2" Content-Disposition: inline In-Reply-To: <20111125175344.233450@gmx.com> Cc: hackers@freebsd.org Subject: Re: cron(8) mis-feature with @reboot long after system startup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2011 19:53:46 -0000 --H8ygTp4AXg6deix2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2011 at 12:53:43PM -0500, Dieter BSD wrote: > The system doesn't go multiuser until the rc jobs complete, > even if you attempt to background them with '&'. ??This can be > a problem with long running jobs. ??I started using cron @reboot > for this reason. >=20 > I haven't run into the problem since I've never needed to run > /etc/rc.d/cron restart. Yeah I have never ran into this either throughout all my use cases. cron(8)= has always ran and stayed running until my OP where I found out the hardwa= y. Would make someone proud to be called Paul Vixie. ;) >=20 > > Add an option to cron to check lastlog and if within 5 or 10 minutes > > of the last reboot, then call run_reboot_jobs(). >=20 > Depending on timestamps might be okay as a temporary quick-and-dirty > workaround, but there is likely to be a case where it will also do the > wrong thing. ??What if you need to restart cron within the 5-10 minutes? >=20 > Maybe something like: rc script sets a flag, cron_reboot script checks > and resets flag. ??The flag could be a file ("> /tmp/rebooting_system"). > Better yet, a run-the-reboot-script command line option could be added > to cron. cron(8) already creates a pid file. Maybe it wouldn't be so bad to just che= ck the timestamp of that before creating its new pid file along with compar= ing to system boottime so we could make an accurate measure whether it shou= ld or should not run the @reboot extension at least down to 1 minute. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --H8ygTp4AXg6deix2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJO0UOhAAoJEJBXh4mJ2FR+GREH+wVcZUtj8FjknGLpY1IzO6QF BDOC5X1dDtxka0TnUdvCcvmGfFM7lx4AqTnRKljfUeEMfRuDA8myrdv7pAUEbNSp wERAKFRG3zm8cUw7Mh2KZNc+9VD0rQjmo6KVtsqgByx8KfvPbY5EriZN2gaFkgf7 mwjg1dEdWOAMC75V16c2T1UeIUaM4AtfdeZxi1Br67Oi3bwmuR+8T/Z82hxZ/Lbo ss7gqV9WpACZK7JbZeTJvS9V3oQGk5VyH618KfJn6aewuYo2Smn6Zb9VBD1iDP9u 0iafQBEcvYtxzALodv+iuZPwPR9hcR8JtgetKqybBvmZXGM9gUi+YqoRMBZYsr4= =0R4k -----END PGP SIGNATURE----- --H8ygTp4AXg6deix2--