From owner-freebsd-pkg@freebsd.org Fri Mar 31 05:05:13 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 58E24D26C93 for ; Fri, 31 Mar 2017 05:05:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 36F27E2B for ; Fri, 31 Mar 2017 05:05:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 33651D26C91; Fri, 31 Mar 2017 05:05:13 +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 3307DD26C90 for ; Fri, 31 Mar 2017 05:05:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4BC2E2A; Fri, 31 Mar 2017 05:05:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id v76so33708222ywg.0; Thu, 30 Mar 2017 22:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=orKGkBESt06LiwPm5TpnoCV+phWVHpmZV7MReowOoIU=; b=mBOWf0v9A5K21aKtFbNqHiCnQ9oHa6ckL77JbfLAhAZW9Pty20Xb9YnEUFsgQPZAVs fyd6Ruihm3ATRIGi8g/nznfrdbDg5H9zyP35C5wkLirW4mq54sXg+eG5RCsHX1MMDelV h7zOipRy3A6Yg10NeDbWQwbluUz1hPmU+cP6T8ZCEFuQMhoZp0iXWjLdutdbNZK9TTyr FOqRDYFUquXyHI0wrfOvzJbRS/4FlnTXR5MaJxB8D9Peiz7YiCYKUmbSQy86iST7RSkH FMdj6hBmmjwHc22rQXm9fMfRlFiLsOdB3VRxUwurfn0Mo6OLD3fPE7xL0cdl9QFnHoX9 glDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=orKGkBESt06LiwPm5TpnoCV+phWVHpmZV7MReowOoIU=; b=PwTK7DqtajmRF+s9w91AOIpJM6IzZYkOxiG8ZPL7YdU8a37seQLKaXiQhp8cEZ6kpp ptCbmL1ZkjUk4LzY1R/Npqs2VpZqUu3WkPCP82H/RxVGbVNm8Uz782hMQMatUODOlLNg 4OkOv/UOY8PyNDrELDNLiMfqHtMFQaQxKzXqlPsCc4qFnFpkoVwGGNIvoZokXZ0uSC7B IcJWYiAYAKZ1fCepUYM0EwHkr3ojFCADqDVSTD+qh80B2nMXWKSHI6C5mW11pk/IkQ7k KFV5VHose/y93e1h676Iq3PtSpiTShENqHLdzl0hWUYpWT8TvTwkia1kbBsMW9apo8LO G5Hw== X-Gm-Message-State: AFeK/H3DnR0YT1bgnjaq/lmRX05q/uNac9M/mopizavAY4UcUMG7qE+76O8hDvqYR3m6cQm12LjSS/nGttpxFg== X-Received: by 10.13.251.67 with SMTP id l64mr736065ywf.36.1490936711844; Thu, 30 Mar 2017 22:05:11 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Thu, 30 Mar 2017 22:05:11 -0700 (PDT) In-Reply-To: <201702162026.v1GKQivr096824@slippy.cwsent.com> References: <86zihmwlth.fsf@desk.des.no> <201702162026.v1GKQivr096824@slippy.cwsent.com> From: Alan Somers Date: Thu, 30 Mar 2017 23:05:11 -0600 X-Google-Sender-Auth: 7otbuKaNXOKXQYvUFJlBJ1uePnU Message-ID: Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts To: Cy Schubert Cc: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= , scrappy@freebsd.org, Brian Somers , freebsd-bugzilla@ayaken.net, Cy Schubert , pkg@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Fri, 31 Mar 2017 05:05:13 -0000 On Thu, Feb 16, 2017 at 1:26 PM, Cy Schubert wro= te: > In message <86zihmwlth.fsf@desk.des.no>, =3D?utf-8?Q?Dag-Erling_Sm=3DC3= =3DB8rgrav? > =3D w > rites: >> Cy Schubert writes: >> > "Dag-Erling Sm=C3=B8rgrav" writes: >> > > This won't work, because && forks. You need: >> > > >> > > if [ -t 0 ] ; then ... ; fi >> > Are you sure? >> >> Maybe it varies from shell to shell... or maybe I confused it with >> other constructs like 'grep foo bar | while read line' (which definitely >> doesn't work). I consider it bad style, but that's a matter of taste. >> I prefer to use && and || only for error conditions and loop control. > > Maybe. I tested this on Bourne, ksh, bash, zsh, csh and 44bsd-csh on > FreeBSD and bash on Linux. I don't have access to any Solaris or AT&T > servers any more. (I am told that Solaris 11 replaced /bin/sh with bash.) > > If the command after a test is a one-liner, like my proposed patch, then = I > prefer to put it on the same line. If it's more than one line then it > should go in an if block. Otherwise it's ugly and hard to follow. Just a > difference in preference I suppose. Under review at https://reviews.freebsd.org/D10211 . Please direct further discussion to the review.