Date: Wed, 15 Feb 2017 16:54:21 -0800 From: Cy Schubert <Cy.Schubert@komquats.com> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> Cc: Cy Schubert <Cy.Schubert@komquats.com>, Alan Somers <asomers@freebsd.org>, scrappy@freebsd.org, Brian Somers <brian@freebsd.org>, freebsd-bugzilla@ayaken.net, Cy Schubert <cy@freebsd.org>, pkg@freebsd.org Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts Message-ID: <201702160054.v1G0sLt8048117@slippy.cwsent.com> In-Reply-To: Message from =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> of "Tue, 14 Feb 2017 12:22:55 %2B0100." <868tp9j9tc.fsf@desk.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <868tp9j9tc.fsf@desk.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav? = w rites: > Cy Schubert <Cy.Schubert@komquats.com> 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 <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702160054.v1G0sLt8048117>