From owner-freebsd-pkg@freebsd.org Thu Feb 16 00:54:34 2017 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7FBCCDE573 for ; Thu, 16 Feb 2017 00:54:34 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 9A2DACD7 for ; Thu, 16 Feb 2017 00:54:34 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: by mailman.ysv.freebsd.org (Postfix) id 967F3CDE572; Thu, 16 Feb 2017 00:54:34 +0000 (UTC) Delivered-To: pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9471BCDE571 for ; Thu, 16 Feb 2017 00:54:34 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6E1CD6; Thu, 16 Feb 2017 00:54:33 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id eAL2cwEj0sa1keAL3cRMzf; Wed, 15 Feb 2017 17:54:27 -0700 X-Authority-Analysis: v=2.2 cv=W+NIbVek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=8nJEP1OIZ-IA:10 a=n2v9WMKugxEA:10 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=H597STJwYSMKlXEtSjkA:9 a=wPNLvfGTeEIA:10 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id BE73F44F; Wed, 15 Feb 2017 16:54:23 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1G0sLt8048117; Wed, 15 Feb 2017 16:54:22 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702160054.v1G0sLt8048117@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= cc: Cy Schubert , Alan Somers , scrappy@freebsd.org, Brian Somers , freebsd-bugzilla@ayaken.net, Cy Schubert , pkg@freebsd.org Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts In-Reply-To: Message from =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= of "Tue, 14 Feb 2017 12:22:55 +0100." <868tp9j9tc.fsf@desk.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 15 Feb 2017 16:54:21 -0800 X-CMAE-Envelope: MS4wfLap6/8khRqib5FQZzZl4qY+BbEkhEmJMvl39WK05pwYGnarNZPgjl3IibPaR9LODY2WhVL8DGu2UXY5MlCHef2Yq3sIc7+SqpIcijAO45M+Xp0z8qya JLRusp0+DWn93nSUlOF95rIFYQegQf+9CwrGVJnfRfT7yDv7PzAXR3KJaRjYfQMJsSpHCXra+6KFDuHajtWx4aYVuJgkzwLDvr4OO7vXza85dWRH66MrQV/O RINLaYo4AJc6CUA6f52+dmQH8bqDU1IfZfM7xeCz9Ln49zg9qeYO5DWPRTyZXDVTWq1XT3R4YD0DXA2wVeiuTdXb8UBCq62Mi7IuKaK6Ev0= X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 00:54:34 -0000 In message <868tp9j9tc.fsf@desk.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav? = w rites: > Cy Schubert writes: > > + tty >/dev/null 2>&1 && daily_ntpd_avoid_congestion=NO > > This won't work, because && forks. You need: > > if [ -t 0 ] ; then ... ; fi Are you sure? slippy$ echo $$ 29395 slippy$ true && echo $$ 29395 slippy$ false || echo $$ 29395 slippy$ echo $$ 29395 slippy$ > > As for the subject matter, I think it's a good idea, and if periodic > always sleeps for a random amount of time, there is no need for an > additional sleep in 480.leapfile-ntpd (and frankly, I don't like that > the current version leaves a task running in the background). I concur as long as we don't incur gratuitous sleeps. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.