From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id E24E122359 for ; Fri, 20 Sep 2024 09:46:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=VbiLIpMT8JQDmpfYxvN4Xp35bXX31hf1C6NECwhiTBE=; b=ku3wa9k/cw7I8qvRDwwvtgf5d6 oWFepv8yCclv3kYSs3JEBsgMzmPU4R5fMDc+HGwfONNe/P90EPW4ppEBPeozklLEUerEwXXizkVK+ Fi0sjLYxVlfcy2HSZbMOudnM2U1gCw4owhXJPezUEy5R+mPqCesc1n5qbIu2IxfAj87PgNEjB+oQO t0vtpvXWrR5BruIxb55coDltVbsy+w10NcX0SL2M1HuweHIFHsJ/umnCRTxk3sTvU3VjLnx2YLGnE 5dHvZKWtPbiwm5j01I3GWEnJAqsY31yUREGr5i39/Rg1lJIHr6sZBTGN/xqhNHdSuJjk77HflChGM A/gbS03A==; Received: by zero.zsh.org with local id 1srYLP-000ICC-Io; Fri, 20 Sep 2024 07:46:23 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1srYL7-000HtX-3I; Fri, 20 Sep 2024 07:46:05 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.98) (envelope-from ) id 1srYL6-00000000Dop-1pjd; Fri, 20 Sep 2024 09:46:04 +0200 cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: <20C9A9EE-49A5-4A58-AA00-136A5D221331@kba.biglobe.ne.jp> To: Bart Schaefer Subject: Re: PATCH: Re: Bug: time doesn't work on builtins MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <53121.1726818364.1@hydra> Date: Fri, 20 Sep 2024 09:46:04 +0200 Message-ID: <53122-1726818364.433682@r1d0.ZNVn.WrPL> X-Seq: 53096 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 13 Sep, Bart Schaefer wrote: > + ( setopt errexit; time =false; print notreached ) > +1:`time' of failed external with errexit > +*?*user*system*cpu*total This test fails on Solaris because the external false returns -1 instead of 1. Two alternatives that come to mind would be test which returns false if given no arguments and expr 0 which has the advantage of not existing as a builtin so no need for the =. Both of those return 1 on Solaris for failure. Oliver