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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14040 invoked from network); 26 May 2022 11:22:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 May 2022 11:22:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1653564137; b=JtxmnBjKIKBeB6qLn/gylSi9+r8ywWTwSZ7jTNMfnkO9v/bdHAadEfHvO64xaqmPePiKjR7Yno 9FDVV7JsfAbXuxmt2751086PKQFpnQA1YCxyJ02QueYBvlqckIC6B4cXAee4OruRACrZm1cuXe rNujSTPDP6/M9Q+wzoKxCbO4MOdjzT8HVONNt63UIX65FIZIKrKZuD6htg3zrgQzRH1audkF1q FEpXzbLgBpvKzeMwPLrC8ZyeCt67so11wYMpCL8nq9kliuyJOlIBjHrEPHvlm8piKv9K/QayVa 1u5Pj4VX8auRislTltgRrJbTj50xzgbT1gKdthhzZ/e1gA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.2; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1653564137; bh=U2zBE7KfY7uzDD1YVBtAkf/GiT1E+RV3mMWmly5acPA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=nB3sjmEho0pbPZKeTAyf53ySlmVKyjaIBetNoI2SsqdJVjKq7mS62MoUJiO/j5y6MsIxAxuz7p /WTDPKns/MjIkPhnEBHaUE2d6GzfyPDB3GhyFdXchn2pS7Sgo8tItdknx3JF7J/KsPNcZ6npgP ilwQSvgY1p5VAHxG+IhSCkC+YAPP2d/IfkesR8XtgMOpNZGoloSAiC7vRtEXLn9uECceeXr7et LQHtwmkhS9Jwn6jpK3ljKEhZ+hZU411vC//NUPSifE2GVFjdybGBNAfU3E/pdzaj0m8kdOv/S5 OnI9UqMeGFt9E8NHomIoS1CpLcS3MLIaIdEJ3gMDZr6O/A==; 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:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=a87I16ly653d54NjCezexrGaHRNUKfm5ox9mDoBLh6o=; b=CgNvkz/uWvanm3gHrXxEiZdkXM AV5MHpXfBwEp+/cJCGYA0zbejL9nB+Su+Gher3Iow0JeQcmIvTJTN3Fg4rvdkFnEZ50gIJfWdW+3c eBhWZv089t2SuWuxSXPHXDbT8k74GUoZK7nUekErkkdzNbC0hGHOJ8ujSbIuoI4ERTXe1JC1JGa8J XpC2SOdhW7bTyAsnuVBWrLTTrYu+zqKS28sZdMpvnrDG3nEmVnmY+GzvSjVx1MrpBLuNo3t4q8C8Y zq81ziIvhx71Z2sp+v7gobFzmst4DLywJ/j4riIhjP3Kp4wKZGcR6+mas0u56/HnADD7HZQ+0np/8 u7x87Ahg==; Received: from authenticated user by zero.zsh.org with local id 1nuBZI-000Jy5-45; Thu, 26 May 2022 11:22:16 +0000 Authentication-Results: zsh.org; iprev=pass (snd00002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.2; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00002-bg.im.kddi.ne.jp ([27.86.113.2]:21185 helo=dfmta0016.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nuBZ2-000JdQ-B6; Thu, 26 May 2022 11:22:01 +0000 Received: from mail.biglobe.ne.jp by omta0016.biglobe.ne.jp with ESMTP id <20220526112154596.ROXP.17988.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Thu, 26 May 2022 20:21:54 +0900 From: "Jun. T" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: zargs with -P intermittently failing in zsh 5.9 and macOS Date: Thu, 26 May 2022 20:21:53 +0900 References: <9162a41e493cabeb0c8fb7c770f6b35035a0be0e@hey.com> To: zsh-workers@zsh.org In-Reply-To: Message-Id: <76D2EBB8-A3C5-4466-82C2-ED2BBF919F44@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50292 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: > 2022/05/26 17:57, Jun T wrote: > > curl -so /dev/null 'https://example.com' & _zajobs+=( $! ) Sorry, curl fails (connection refused) if I test on my another Mac in my home. #!/bin/zsh f () { curl -so /dev/null 'https://example.com'; return 0 } _zajobs=() ( # works OK if not run in a subshell np=20 # try increasing this if you do not get $? = 19 for ((i=0; i<$np; ++i)); do f & _zajobs+=( $! ) done #sleep 1 # works OK if 'sleep 1' is added here wait # works OK if this line is commented out for p in $_zajobs; do wait $p echo $p $? done ) With this f(), the first pid in $_zajobs has the highest probability to give $? = 19. If I replace f() by f {} { date > /dev/null } that takes much shorter time, and set np=20, then I get $? = 19 only sometimes (not frequently), and the last (or the second last) pid in $_zajobs has high probability to fail.