From owner-freebsd-stable Wed Aug 21 3:17:22 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E81C37B400 for ; Wed, 21 Aug 2002 03:17:20 -0700 (PDT) Received: from frontend2.aha.ru (bird.zenon.net [213.189.198.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCA4E43E3B for ; Wed, 21 Aug 2002 03:17:18 -0700 (PDT) (envelope-from uitm@zenon.net) Received: from [195.2.83.132] (HELO backend2.aha.ru) by frontend2.aha.ru (CommuniGate Pro SMTP 4.0b6) with ESMTP id 139109671; Wed, 21 Aug 2002 14:17:17 +0400 Received: from uitm.zenon.net ([195.2.69.86] verified) by backend2.aha.ru (CommuniGate Pro SMTP 4.0b6) with ESMTP id 28395090; Wed, 21 Aug 2002 14:17:17 +0400 From: Andrey Alekseyev Message-Id: <200208211017.g7LAHHw26813@uitm.zenon.net> Subject: Re: minor annoyances In-Reply-To: from Pete French at "Aug 21, 2002 11:03:12 am" To: Pete French Date: Wed, 21 Aug 2002 14:17:17 +0400 (MSD) Cc: freebsd-stable-local@be-well.no-ip.com, stable@freebsd.org X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > If it works, '(aaa &) && bb' can't mean anything other than 'aaa & bb'. > > The "bb" always executes, regardless of the result of "aaa". > > It does ? I would have thought that this would only execute "bb" if the > fork succeeds on the right hand side. How else do you test for fork failing ? At least it definitely will fail if aaa doesn't exist. (aaa &) && bb This won't execute bb unless aaa is runnable. I can't say for sure about fork operation itself. I always thought it's a valid check for failed fork also, but it seems that sh(1) terminates ubnormally if it can't fork aaa. However, at this time I have no time for more testing. > -pcf. -- Andrey Alekseyev. Zenon N.S.P. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message