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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4503 invoked from network); 14 Mar 2023 11:15:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Mar 2023 11:15:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678792548; b=TV3HAMRUxxJ/yvlFBG4m/qHfIbIsFw4rjV+1ycAq4R5MbWWhMsaiUZRG/qei7sx2YZALYWucd/ AIFsTaXKsT8ryKThyH+OCaZv3lQDg0Yi+vB4naydy5SDD7dnE3s+tpneXZiRlepV4IXhWWctTr vsQBlodkTtkGb0qcSFLsPkmGHLwg2i91Eoj7mXnBYPXVItiAPrjvn3EY0iQDb9Ny4Dbni7qNw1 g6Vw2XmFdYwICjp9nDraBlnQaE/Cu051dIsGFL+1XcoFp9iMqHLX4EZm9WXu+xQtkFJFIcSco2 yqKCvVhuU0vXemj0VPdyXJGiVsPeozidTxlsvspwAjEOtg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f171.google.com) smtp.remote-ip=209.85.208.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1678792548; bh=hlv6Xk5G4TzozV0sWA1XHHLqd/gxzQiuaBt02+Ky5h8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=oXPcWWZNC4HhgQGz7QLCQGWK5qDWJhr3dWOrUdGH7R3KVeVZJ/xXnRv7Kst2t/uAoSEjT7SQnk QBuu8HYGHFY7aqfQ7V4OB50InRMUEAUfDMV8fVNa1O3sfdHun7oQUd4zgiw/z/nZ8ParMJ1l4t V0PAvANrFDtxJ9x8BF3WmpN5BGUpjaWF4mO6WEZLnNB1T7JDOJut1uam/rN3tW1uDH7/rEHeM5 jxRojYr/gExzmrQKNsuhS6BNiv0Vg45BccCffNnmnmKsmG/7NoYPWQI2SlPh0NhAD9y9ZjGjZy ZKOIYvib8vcDqUzDhwTHedSnfsFzLMNBnnTQ10PMnPVYGA==; 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:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=D7+8LCSvcc5eR7N5n0s0ogigR5vpnNxmLDr/RC/6EYw=; b=Gz+4uzddXIffhKtwbqMLrB5clo RQRqEpgqPF6e/+hilBIMEOyRD08N8t0/ZN7j+rUe9g3v30V+9xCqL/j5AoTZMQXrfUnIkGwu6Hpoa DYH7xn/ua4d1W4EGC45nnXdl5LZ9RpOf8UwmGosR3LQlikbFcGf4/Ee0l04EwH9ooDHdUbu8RFgDb aMr0SgVc92M2cEdTgF+qThQQVdRjSquAKSzmVWwFsfh4dbSGNR3S8KlooEmEeg4EFUWxljd0L/oZs 8yoWMFAJQZpyqJT61A9sd6cS10Sd3oB066JAyPMsjJjhEMdUM6ChPEykW0DAXkSeytNWc+FPF+2JF bsmLAqYA==; Received: by zero.zsh.org with local id 1pc2dA-000E0u-Df; Tue, 14 Mar 2023 11:15:48 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f171.google.com) smtp.remote-ip=209.85.208.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f171.google.com ([209.85.208.171]:40547) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pc2cx-000DiP-84; Tue, 14 Mar 2023 11:15:35 +0000 Received: by mail-lj1-f171.google.com with SMTP id by8so15602294ljb.7 for ; Tue, 14 Mar 2023 04:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678792534; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D7+8LCSvcc5eR7N5n0s0ogigR5vpnNxmLDr/RC/6EYw=; b=iQy7/Bzuqtd3KF8uBPDdWXbV7o6GGtuMeWfiwPltoWsIpZD6iR6EGeCtIyVgt3mPb7 NovSHxO6XdN3kjH6UJOuINeg1J5AmOfwJkUot9DfDaQznKvFNTgM9MiGn79DdeN6nqGK Cj5IRS4PvIh9ojDKbKOUmBweVE6hj75/ZOGbJ4SGF5d3OQxCT9vmradA9uHNn9fpUt+5 jbv412AnQuS8oT02cWxy6CeLHqcG1Mv98FkgWf+5XUVqOTkNJWsH7u0v0esyuh0v499o SwXte88ow8k4kLKV6BdtdbSM2awpZ5jTK21MYV/xw0G/ExSFScm2EHToeh8J5DjNMMGw DFSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678792534; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D7+8LCSvcc5eR7N5n0s0ogigR5vpnNxmLDr/RC/6EYw=; b=b0tASShA+ybyzIvUs9bmMF3H+qNhWVo22mfykGrWX5TfMCIJXMTtzRkSPOgq8UPuJu yLL26wvXw9V/ZKzYaHIL30EuK4y3yc/Ei2b5qT96iwnn3xy4cQ4ntshW8u7elF72JpkI iOTcwiR5TUb254/s65Ogy7LNZ6UQqFozDtSQ3jmanjUamD/Z3sFXQYv0YzA+JgtM2r1C /XnogLfio8RX+WP10u+qktpgTtsoS4o9mhLP0WgYb9SWKccQcKeqzkR265cz4O5Crgzm Pey0YKR84R5pOLGNscnkdTq7WMLtSTx1sl+x8/ySn8v6SX3sfOA4VbhLYhx4dlayZZc4 tfRQ== X-Gm-Message-State: AO0yUKWrOGH35Y0z6boAyngz4PPTEXbUiV93B3bX6U4fVs44eFYMMNdi CSeZAKIaKG/9Tirq6WddkHAozEyPxNW4ssb7MdY= X-Google-Smtp-Source: AK7set+r0UbY+asnaZRfHlNnyPMb/u8T7K1Cg//jquZ32ub4uXqT6zwQya9Y8I7RaGgwOU8hJDzo+RdBUf9fFulOxEg= X-Received: by 2002:a05:651c:1725:b0:295:8ef2:8707 with SMTP id be37-20020a05651c172500b002958ef28707mr11700730ljb.2.1678792534427; Tue, 14 Mar 2023 04:15:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 14 Mar 2023 12:15:23 +0100 Message-ID: Subject: Re: Effect of different sublist execution? To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51575 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 Tue, Mar 14, 2023 at 12:07 PM Sebastian Gniazdowski wrote: > > Doc say: > > If a sublist is terminated by a `&', > `&|', or `&!', the shell executes the last pipeline in it in the back=E2= =80=90 > ground, and does not wait for it to finish (note the difference from > other shells which execute the whole sublist in the background). > > I wonder about presenting this via some real effect. How to show that > only the last pipeline is running in background (like the doc say) > when sublist/pipeline is ended via &? I'm looking for a snippet that > will behave differently for the two cases: sublist &-ended and ;-ended You can try this: sleep 5 && true & In zsh this code will block for 5 while in bash it'll execute instantly. You can confirm that zsh executes the first part of the sublist without forking with this code: % zmodload zsh/system % print $sysparams[pid] 4268 % print $sysparams[pid] && true & 4268 Roman.