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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6527 invoked from network); 29 Jun 2023 14:56:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Jun 2023 14:56:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1688050604; b=KX1yVzOlq9me/0XyzJMwrpiciJizsO9tl9rILKffA9Vt1CqxRjxajohloAv+xdSCdi7kAVKFX/ 6IccBhsXDEf8Ta5O09m89aW0eYaBqYqhtyxQTWfu/povi6bMsvg1qHODMbrnsu9dgnum075J4w rNyvWin6TDBH6Oft811NH1xkUtcQdds1kZz85l9e8PNVLjA9fvAjWj5dhcv4nGXwvkdMtuwXLG chNZRoZWoFJEZxtofTQHUtLYpjhJXpWLJh7Lfu+n0kPzceexXCbFTfmlM4lzmwyujm1tD+W0Q6 /vCLg/3Ktb0LywD0Je9OuiPK51r0qVRhc8pL5W3adOnXZQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; dkim=pass header.d=gmail.com header.s=20221208 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=1688050604; bh=nmZcNyF8bi7uox7rOVTjoAZSQsCTEPBnajucGMisqsk=; 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=URfBUsduko1ojeJTbtmxmfwnFxjAIcogx+T67PcZS+y7ow/rsb/RDKWB5xHjhF2LpSlu0Pqavl BbMW+X2DqRhwkQEyfn0LsTujd2Y2SK/VA5Smhd8Oumhxjf5UBTS30J3Da7us6blCf6V8vls/aY O4GYYlR5SWcwkCtCKt0ZMN+F5aAjlC+ncT14vnZSz4oFfNxmpgjlXOUmZ4XU2BtFic8SckIvrI iSppmi/8+Y46v79eiDjb4NzaHXBRmfsDma8mIJuPtx72SM6GaeeTV+77aifdlkOwe31Jdpvwdk KwPPRzOytw+ZouYF/iF6LgqVDY2JRdgQzq6CSbhGnXurbw==; 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=/GISn2KdLpZ9IiqaGj/3N+VPvU9W0+e8GE2ZOuQOuRg=; b=DKL5dkYdujCkX2gHdTsv2FDlfu IYM2rdEINjecnSsVfqOH8YStC3jfHP3osHBzPrcckxEI155AidXI4uR9LnbYzXJVFEbVE6JmdYAgU AGSYEsElmakkLcZI9RThjlRpwRB3aO6TH42R6VtAMeA/swIpMuykhnpQ/H0B09XdMtRux8D7o8b0S PoOl8nLN/6hMXIl7BHNsTKcyvU3hgyammbYcreIkLavgZGi7xCToNbMGTzwVBJBNzX4LuMVJzbAKL oINY7CnhUfg3KddqsdBrxggjBdHWByKneNEiLXZf+LoMlqh0/KE8VrP+lPAboUUmMFjsHYVOfCyMa bNaX751w==; Received: by zero.zsh.org with local id 1qEt4e-000Py3-0Z; Thu, 29 Jun 2023 14:56:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f181.google.com) smtp.remote-ip=209.85.208.181; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f181.google.com ([209.85.208.181]:49543) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qEt4B-000PFe-7v; Thu, 29 Jun 2023 14:56:16 +0000 Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2b6c3921c8bso11934501fa.3 for ; Thu, 29 Jun 2023 07:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688050574; x=1690642574; 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=/GISn2KdLpZ9IiqaGj/3N+VPvU9W0+e8GE2ZOuQOuRg=; b=Y4qOL1IzupHmbKHVSyUS2/YdlPU71sryCy+RKwEsWYEKANW5HEh17XFEvnjdLQo5+w mSREIbfEhWFhwyYhrpak/NJqZkibC8CSMEVINoCQd88HNKkNaK2qhvVEKvc0Vm6CMRV0 3ZXOXYRjJxrG+eJgwWVGkdXxVPmDOdmAI14k7SAM6D/84EjN/bVBWAHwHsibm5YahFwe kQ0s776YvaHHe/GiA8p+s74QyRVE911RYK36hvTPpAoDYyCcn7s/EP9fi0zyfP+T8bii 2wc30aLqGncQ1edCm5vFrQ8UKE8rOtuh14OeFjFy6Z3fm9zZoAQf4bwRRSTNmYLEfKPE ZhrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688050574; x=1690642574; 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=/GISn2KdLpZ9IiqaGj/3N+VPvU9W0+e8GE2ZOuQOuRg=; b=hVHQF/CZs9eX6YGc7z7zGCBtYCXhlnTJLvC3McGCjn0Myay5ecZUNPAeOpt+O/HO/H wrLYecw9QN0iNXPfXedye2weJn92nLoDDdY9RaLEliSD65X0ZGFueIhxXhKpQaSBomW2 EvEwtA+GTzGjyiJpYxIjjhzZlAr7us8yDtBkhVdYadKn43lJP7cweE0nCORHxxpqfE3I yJ2uZXf7XBESNBTZMZqbpT5F3R3IXA7/KLTYDoFpMsuyEw8JerIibXaeUpfoAu8tpN/n qIr2mr8HSh21+5K1jVvHnUnEUNtrY/f5ROBqFq1cxAJiGVjd87YeHC29KR7UZDCv4ofN g79g== X-Gm-Message-State: ABy/qLb2p60lTTunhHiYCQq6fwjTETWW0QH7aVpanQSzOdtlvpj7CrFt bT9Cxfb7uwP4dQUFF9ddBFwcPwoaPKInJoYNox8= X-Google-Smtp-Source: APBJJlHI3IC9SB18rREHKgpYE2KFIxSKMxlfJkaNu6Ew9HhOo+KBKg3m3sU6JuZJwMw6my//eOvlfWQnOGo2Syl7BaA= X-Received: by 2002:a2e:9b88:0:b0:2b6:c569:e24 with SMTP id z8-20020a2e9b88000000b002b6c5690e24mr1777544lji.49.1688050574247; Thu, 29 Jun 2023 07:56:14 -0700 (PDT) MIME-Version: 1.0 References: <25FF68CF-F93D-4745-84D1-A97A5ECCA348@gmail.com> <36f09056-0f1a-1b8a-dcf8-0ab222857ea2@gmx.com> In-Reply-To: From: Roman Perepelitsa Date: Thu, 29 Jun 2023 16:56:01 +0200 Message-ID: Subject: Re: Bug/regression: tt(RANDOM) seed not updating when $RANDOM is used in a pipe To: Bart Schaefer Cc: Eric Cook , zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29095 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: On Thu, Jun 29, 2023 at 7:43=E2=80=AFAM Bart Schaefer wrote: > > On Wed, Jun 28, 2023 at 7:46=E2=80=AFPM Eric Cook wrote: > > > > On 6/28/23 16:10, Jon Oster wrote: > > > In 5.8.1, $RANDOM seems not to update its state when the command $RAN= DOM > > > was used in is piped somewhere. For example: > > > > > > Is this considered a bug? Or is it intended behaviour? > > > > > > [1] https://sourceforge.net/p/zsh/code/ci/faf0035e532cde45528806e7a05= ad28a0ab7c0fb/ > > > > The LHS of the pipe should be a subshell, so the behavior is intentiona= l. > > This was, however, an unanticipated side-effect of the referenced > commit. It changed behavior (that, before, did not conform to the > documentation) without that fact being called out in any of our files > that serve as release notes. > > It opens the question of whether anything else that previously was > "pre-fork" might have changed behavior at that point. Perhaps things of this sort? % echo ${foo::=3Dbar} | cat % zmodload zsh/system; echo $sysparams[pid] | cat I cannot reproduce the 5.4.2 behavior reported by Jon, so I cannot verify whether the identified commit affects these test cases. % docker run --rm zshusers/zsh:5.4.2 zsh -c 'repeat 2 echo $RANDOM | ca= t' 15988 9706 Roman.