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=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 29140 invoked from network); 11 Nov 2020 16:42:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Nov 2020 16:42:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1605112954; b=SnqRVyQR6kFqOS+eUJhoGCqYr1PijfOiqL8v/p93mqepM8amEPA50nERruotnOjMBKEp8z+W8m 8MHQwfVvs0QTmJC+X90CYXl7gOah/RxTLmoL6z82rxWy7g1nhErYHU4h5uizNyDsR+fBNnHGMy A2wiMr3535RCbdV3yRxHKMLLeWRFP6Kc3xXfySUiEUrqdNe8VtSP0YW5O+hlwK86LNos5pqTlI sphXqvM1o42m7/t0xYpNJ7ujkrLv+hwKhdHY2KvGXRoGnCJXMxz8LvgI7w3ppPp38bSk6Cl/0w fwDx0/uPFry8IsWF7xjG8d6Ts8szVZ6lXYNKRh+wNyHOKA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1605112954; bh=DKbaHWFvFIAQxbr5EzixGL2Cr0i/1lw5CELzFpt9NNY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=y9H3tkRTc7FA7m0jOpqwofn5j72zNlaDHYEbhNPEE8w2sVghfOj5Y8ALY2AP4E9NIiJqR5Exi+ Dm/sNoKyuVBTae34Vhw1npnccbQR/aPutoJkfLPtJxzPqoQLLhK1rlpXJ/43hyAjBxqj7KVagj 56MpvXdVfxCIB/X9nHp7T+YhGzjWdFeM/37OfMzzroMP6JXGKQdsJSjc2l0EopXQZGDaNR92Jk yB2Fqm27QSCwP9Bcm5BjBFGzz6wMzFww3F9wg3DNlCdc53bwQvuVSatfeD0TwE3/acsMn12rY0 hnulc4F0DLAEZNZ+0I0WpSd/wEfRP1hqwJ9H+dQhIOKxqA==; 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:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=xXglKngmUA8799S09Bu+Z3vN8HMilqcssYK1U3bBwt4=; b=nyj1RdzQjHQmqk1bKEn3uQyZQJ NB6c5EetsZeFAecdV4wxx78/AYGuh9fKc1k6wZ9kU+nKniHex1xqmv8K5alhf+jk8pf7b3IL4CkT2 NAAVvtXFRcb510h8e+0lgz1wAE8lDEWxoLf6EGwbvB+6+NMDMixGQPTkZFwFviSrTlXW1lAkMi8bu yDgC8jlznjFbMtSoy5hOTZMgehdRjNT5rfCbeIf18iSjNZcY4f3++R4CEP2oSkRuSTIBVqC5Ozdsk MZmT8ZP+H9EeXEsahqQ1iUmLtjGwD2ubt1EXQ3A28mrcIVrQdMU0p+1RGtcy4zkWRPZDQAJ2HVTDZ GegCJ0jw==; Received: from authenticated user by zero.zsh.org with local id 1kctCc-000Msp-E7; Wed, 11 Nov 2020 16:42:34 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:52980) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1kctCC-000MX0-AP; Wed, 11 Nov 2020 16:42:09 +0000 Received: from [212.54.57.81] (helo=smtp2.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1kctCA-0007i8-B1 for zsh-users@zsh.org; Wed, 11 Nov 2020 17:42:06 +0100 Received: from oxbe20.tb.ukmail.iss.as9143.net ([172.25.160.151]) by smtp2.tb.ukmail.iss.as9143.net with ESMTP id ctCAkyqvCMKXXctCAkDHqZ; Wed, 11 Nov 2020 17:42:06 +0100 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 172.25.160.151 X-CNFS-Analysis: v=2.4 cv=askMtQVV c=1 sm=1 tr=0 ts=5fac145e a=Ip+kZtMD4PYul4iMASbA3A==:117 a=brd1hNE3X6AA:10 a=IkcTkHD0fZMA:10 a=eCkG9cKAQX0A:10 a=If2VLsBYAAAA:8 a=6OzB40WbrV93wS_ZzF8A:9 a=QEXdDO2ut3YA:10 a=ZCxjKSnKyCmnrEQjtP-5:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1605112926; bh=DKbaHWFvFIAQxbr5EzixGL2Cr0i/1lw5CELzFpt9NNY=; h=Date:From:To:In-Reply-To:References:Subject; b=hwdqJ4csFBrYkvaLHsj8pRO3qw2vD4iopVTjYBYevtLT0BI1Cwmm29+9rlVfKmvKp /UY1Zoefb4rwqAvCSGlgAGukHN9XDdDGYlF1qcCYrjEC/j/m6nXR/3V/RyksW9ekK2 7ziCmLeJ3n2gPvIKWic5uv76OyeFPJbfDxFGOV+P6jOQDd3m+Nma41SuC2vrqzDXC/ fOy5URMQTuIv8MztZv4iyQhpF4TzXeSARvMA8DJeWpu97J9bmx9Ltr2dG8BOk32c98 hKzPxo4O+wp1sUwYHD35X6wg4eZrNeQiZVCz/mnxeu4H5ZsmJ/4sk8rvtPBBR++DOG psdHJQmfEXGYA== Date: Wed, 11 Nov 2020 16:42:06 +0000 (GMT) From: Peter Stephenson To: zsh-users@zsh.org Message-ID: <774738440.1331269.1605112926240@mail2.virginmedia.com> In-Reply-To: <02c5fda1-c1ab-d0a0-9350-a5b122cd1394@zentaur.org> References: <02c5fda1-c1ab-d0a0-9350-a5b122cd1394@zentaur.org> Subject: Re: Odd behavior using MULTIOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 165.225.81.103 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfPgkmsjl01U5IHopiEv3XmE2U2P5pJOE/TMWY97dr43jaLw++kcYk03/FoZx7dgvlU1SxBZQZW885aoLi305HoF+r5zcSK0Gi7d3rcq/WLCu//SwvjnF n86MchPt7CKmDw1BeLXm1Mg8RhSCve+GuJAZSN+FbVKxjsXZQ4D9a2QGz3PxhxJgQbrxMoXTuPYUFYANopV45NQ/OoIozWKm7PnDUCpYNEmnOdkibbgE6HcL X-Seq: 26148 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: > On 11 November 2020 at 16:25 Clinton Bunch wrote: > Is this the expected behavior? >=20 > setopt MULTIOS > { > print -u3 "Testing" > print=C2=A0 "Second Testing" > } 3>&1 3>/tmp/test > % zsh test.zsh > Second Testing > Testing You mean the ordering? Yes, as documented "the shell opens the file descri= ptor as a pipe to a process that copies its input to all the specified outputs". So this= isn't synchronous within the current shell and you can't rely on ordering. You'l= l note there's nothing there to determine whether the downstream pipe component pe= rforms a write to the terminal before the main shell does --- think of it a bit li= ke { print Testing; print "Second Testing" >/dev/tty } | tee /dev/tty /tmp/tes= t --- although I'm not guaranteeing they're identical and clearly there's roo= m for lots of things in the two processes to affect the ordering. pws