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 7846 invoked from network); 7 Jun 2022 06:52:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jun 2022 06:52:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1654584754; b=ddBu1wfYOQl4DUsLPuvqDbL9ffb0H9sEE+BuTFCXKAToS3Ng+T1gorh5mD4s98OGpGO7DdkixQ JhYQNPDsNzo6S5+xe1U8LlfFBQIpDfrMRtGQPWNYXt2viA1TxJSVj9FfCO5yvT3vHwxx+t4Bg0 d4RLxWgGU263WPA5KqM4a0YRF4di7sFmUV7peyHW3HYzHp6G5HoFo4dHcf2PQx9axl8FDQz1H4 ZiMKQbQDumnyC8ZRr1gSBWT2eENjjEbmEzw90Pcxvdw2lqLWX3x1USFSj2HhVB79YUKV0xzQyo 3ARcrfk7ELI2d56A1Pb5Sxqs8EMI7ijZRXOAxKZPMKEjRw==; 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=1654584754; bh=Z4UsYWNQuU1PyABpFlWBUTxm4BL11nsdNxYsmDEpKiI=; 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=XYbF6dsgb3Ixyj1s4fG2v3ySlRjLdRqV/KzdLkNtZrLqZoyZZ7nAX/zJwayW9NSo3wWhcFCrCm AX3Eva1FOhRGMpYMbD4SalRjwUSSJqR6CmODurrYdceHB85dqvh6TD4fiymfgiySsWafUCN93f A7bFYYDvdV0LwlR2YHMeedvUwoWwCvG8LuLezMa5UU0Tjocd0eYJskc33xKAg9U7QIyRbNpNEl 2M0KB+TCI/Y0rVCtGhubLKtwZ1oeTdOuBeKzzViElSfb0pv2faQoK3QMxOqvMzblPdq7XaDTfW WYWxfjI5+mt3RRurrYknpoWFB8iVhjBlMmUI2fp0sLB8gg==; 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=264v7yNKcyI+DvC9/IioDZfMHISAlwikcSo8gfKdoO4=; b=oPf5jAxQyf6nTlloYyONllHnmD pcTcfrN7geQSMxKruj3P7HO3jGHjkn3uOb4RuIuUgURkH10Z/Ku/7tzNOZ+30tmvOtHnjNJJizn+j /vKNidmZx6wS789JgNTIE60v2KXYigfE6K7MfmiGu42HsWLizvqbUEffmyqeoY5/v054jLZ8NSKVk upU6Z6rKFgRVZQ0jFPzHpCE8p6aUlUglY0ZbSEG1VB19h1qsPTAwtKpCWVSbVTy+DzQfEo7cldbKW 1GbmMer0xwT2Lf194qxAtCqHVPl2sxYvxZMxu9D1MjISE3P/4ZIWeOP63UzQftlOVW89QBW3LY30W DhHiK+jQ==; Received: from authenticated user by zero.zsh.org with local id 1nyT4s-000JKB-ET; Tue, 07 Jun 2022 06:52:34 +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]:58016 helo=dfmta0003.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nyT4I-000IyR-AY; Tue, 07 Jun 2022 06:52:00 +0000 Received: from mail.biglobe.ne.jp by omta0003.biglobe.ne.jp with ESMTP id <20220607065152948.ONEJ.82237.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Tue, 7 Jun 2022 15:51:52 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: zargs with -P intermittently failing in zsh 5.9 and macOS Date: Tue, 7 Jun 2022 15:51:51 +0900 References: <9162a41e493cabeb0c8fb7c770f6b35035a0be0e@hey.com> <8CB92976-5B21-4239-844E-93C88EC734F5@kba.biglobe.ne.jp> <957FB7CE-B2AE-4C22-9CC5-0883B2FAB62D@kba.biglobe.ne.jp> <758F3522-3613-435C-B2F6-3FC62220933B@kba.biglobe.ne.jp> To: zsh-workers@zsh.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50342 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/30 20:16, Jun T wrote: >=20 > (5) Revised patch with test It seems this test "sometimes" fails on macOS: --- /tmp/zsh.ztst.40838/ztst.err 2022-06-07 12:45:24.000000000 = +0900 +++ /tmp/zsh.ztst.40838/ztst.terr 2022-06-07 12:45:25.000000000 = +0900 @@ -0,0 +1 @@ +(eval):kill:4: kill 47169 failed: no such process Test ./A05execution.ztst failed: error output differs from expected as = shown above for: sleep 1 & pid=3D$! kill -STOP $pid sleep 1 kill -CONT $pid wait $pid Was testing: wait for stopped and continued process The failed 'kill' is the second one: 'kill -CONT $pid'. If I remove the 'sleep 1' between the two 'kill's then the test always passes on macOS. But this is not a solution, because then the test passes even without the patch for signals.c (at least on Linux). The only way I can think of to make it pass on macOS (but fails on Linux without the fix for signals.c) is to increase the background sleep time to 'sleep 2'. Is there any better solution? Or is this test necessary? Patch for jobs.c below is just to silence the warning. diff --git a/Src/jobs.c b/Src/jobs.c index aa32f4e80..e0e453ed8 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -2221,7 +2221,9 @@ addbgstatus(pid_t pid, int status) { static long child_max; Bgstatus bgstatus_entry; +#ifdef DEBUG LinkNode node; +#endif =20 if (!child_max) { #ifdef _SC_CHILD_MAX diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst index b257ddf2c..bcadc6d56 100644 --- a/Test/A05execution.ztst +++ b/Test/A05execution.ztst @@ -396,7 +396,7 @@ F:anonymous function, and a descriptor leak when = backgrounding a pipeline # TBD: the 0 above is believed to be bogus and should also be turned # into 127 when the ccorresponding bug is fixed in the main shell. =20 - sleep 1 & pid=3D$! + sleep 2 & pid=3D$! kill -STOP $pid sleep 1 kill -CONT $pid