Bug 217055 - Consolidate random sleeps in periodic scripts

Cy Schubert Cy.Schubert at komquats.com
Thu Feb 16 00:54:34 UTC 2017


In message <868tp9j9tc.fsf at desk.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?
= w
rites:
> Cy Schubert <Cy.Schubert at 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 at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.




More information about the freebsd-pkg mailing list