From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20471 invoked from network); 9 Jun 2021 15:33:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Jun 2021 15:33:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1623252838; b=ttLLU3PIonFCAxi3YkrR2JrFS3p/fE7xqR5Y0sqD288wEThrK1CYjrsduTpshGQNBzvlwKVxFJ tZNEPekam+puT63TWfaZdPZif++71d5LX/NptS/bfSNE/7cDeIyb3gWUn8eWJ4M3Ao2ujHnXWW T0lsCr/e61pm4bhtSdKx+owRZVchN4aVBFdRmz1TDjz7rGxlmr76SoEJKJi2Rcx6hmScVHQZ/3 DNVExCyd3K3/pm/yZ7IYZ5dFaEYcBWoz8QMLz3Vs+YNM1aYJfTSWH4yyy5Bif7AB/BZCX/LSFg UfvFvdAf/OCX6VR0crHnw5/O4V+DwXukcbIljiCfRGInRg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay12.mail.gandi.net) smtp.remote-ip=217.70.178.232; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1623252838; bh=6nTLuqQVAdp8z0Rr0ZhLL8LUBRigPoFwj7LQJgHlHME=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:DKIM-Signature; b=NQpVrKpzaNIRBECksimXQ82uP65xFvzsd+u9AaZMNO8/xJM+RwsYvUVb04z6siqdFPoDnche3U DthOUU8M+pBaSPMnCpxmq85lPL1r1YUyCyl0Uau4/21WGoG4wdERgq1Kx2rYtLRh2Qh0okWifY 7ph0wWKjGE7rL+nMdfnqRj5e6eh+v4tmO0q+YiPgLxahcXyqXOrN7+LkwGJmPweWcBEGcGR3yD p11u85npQXSnsLyh0cKBGN2j8tt644S2OyYkH3d8TbI3+tsE/7e3hXokoal9dQ6kRJhrAwBFJl bUKCWSNt/nbFsGcimced600G9gj2PjDuCUIBlryTwxZy/A==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XHOu2KUcI7qSzJJgQOMbjMublOMKlmCP8XIXNVEHzF8=; b=oXnf8VdCz46IoLSB/S5H17ZYY3 Z7fCIMdaW7afe/jzae1lbhb5LTNHK39VBYdluOxLcRQYOWvR2b4BpcgN1ztyyUYfnRP5rxMpX8YPL ltluNIYphkxbX0Z/FGtDzfKoq8jA5XBAR0uZaHy/pXDEMRRhs0iQXm6zn+JjLX0bTpgBWThkyPmZZ rZjPh/NdXm4CasoeQGhDhSeHRAJoNlA29pKhtHGyLHLLGcJObxbydw3OK3NGgXPoAKin8rqH1DsYo my23sJhkB6H/mRb4XICeShFeUyUA7s5ERgKuXWKtBrzAYjzRCdQ7K853P9/AzmXIdbWuQOKKLr4UF GYkPZawg==; Received: from authenticated user by zero.zsh.org with local id 1lr0DN-0001kH-CP; Wed, 09 Jun 2021 15:33:57 +0000 Authentication-Results: zsh.org; iprev=pass (relay12.mail.gandi.net) smtp.remote-ip=217.70.178.232; dmarc=none header.from=chazelas.org; arc=none Received: from relay12.mail.gandi.net ([217.70.178.232]:37039) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lr0Cn-0001Qa-V3; Wed, 09 Jun 2021 15:33:22 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 3CE6B200017 for ; Wed, 9 Jun 2021 15:33:19 +0000 (UTC) Date: Wed, 9 Jun 2021 16:33:19 +0100 From: Stephane Chazelas To: zsh-workers@zsh.org Subject: Re: [BUG] builtin echo doesn't check write error Message-ID: <20210609153319.7h5v27vlahutfvpe@chazelas.org> Mail-Followup-To: zsh-workers@zsh.org References: <20210609140940.GA813383@zira.vinc17.org> <20210609141730.GA813881@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609141730.GA813881@zira.vinc17.org> X-Seq: 49041 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: 2021-06-09 16:17:30 +0200, Vincent Lefevre: > On 2021-06-09 16:09:40 +0200, Vincent Lefevre wrote: > > With zsh 5.8, the builtin echo doesn't check write error. > > And that's also the case for "print", "printf" and maybe others. [...] It looks as if EBADF is treated specially on purpose. Errors are reported for ENOSPC for instance: $ zsh -c 'echo asd >> mnt/a; echo $?' zsh:echo:1: write error: no space left on device 1 For print and printf to fail with an error upon EBADF, you can do: print -u1 -- Sstring print -u1 -f "$format" -- ... -- Stephane