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 3386 invoked from network); 27 May 2022 03:40:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 May 2022 03:40:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1653622845; b=edn/12O0Rh7g4LoBAFqAJBkkk6wbFDAgfdM0on/Y+0W9QWPpmop7GPRI4s7ZehvVZyKBnbWSzO 4qL9KwV++OSzHksLm7A9x7235JLA7cqZ6H/I8lZKwGtZgjeFocJquyYqlJTHE1m5ZFLcT7yO7X clfChJAnwV4k8C0pFCeCTiq8ThLY+bakFnl23cJJaOFx/8mK6+4h5XfGD9UXaZe7/V7+3E9+cR l/rfaxiEYS6y0QI6c++sQRb+KSuBiwIEOgzYQGFT0DuifHrUP3MNkc+RfsEL68TjYsqCwAb1lR gn1TxPT5yJ1KJYc/8OKDrnOJisqbkHNsweveFRt9+RN8lg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1653622845; bh=BwaFBKsLYZML9OQpFLSuOH3R4wrV6MhXv4Ceq4Oyfn0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=PrWs3Q0vkD0dlDo9HnlYmzP2QPUWx7j7UxgRtoJavEXsF9OdunTj8AkzTHJs4j9BS51vJko1s5 tkXpFbW23WwEM+l2ggC0yj0FcRqcTEkIno7n61ZLFwjswZ64DYXE9fj4iszsgIrbmtwnkgj8Es cIple6vIlZEbd4MzaQFTUzGYExLwG9ry+SSCfi8MPhjXYkYmvVzZCL11VJd1eis1IrKZpwJBL2 4YWMvJhrBBa0dVgjN8DmYxlpJboZQj58/yfq4B2QDqrB7jQndqLJ0tGnrGdBx+KmHqL29JUX7X WUl0tpptBqeJI6jeZJ0fLgB30QsilyMKP87rWJmzv7KyqQ==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=KXHdHViWCboPtSORB8j4GOehQ8chl8cl8KAVDOjGjNU=; b=cit6/iRFg/2nJp2GKrkqSVavQ3 730YVqFfuMyi52sl9kZAJmYtYiRLvh7L6VRSULbkWrxHp2BxWm3cwGOGgBN7KnJPzwNN/2S//Tyq2 bxOjeuT69EZ/94yik+OIEfQuFqORwCoQvabwpM/SMl53mxXcfcyns6mwHkRsVQSzwejUqjXcgrPVb 29MyNCei6YQ+M8dDgEF8JuOSYkCrWKH9a4/HDsk1z1RiLkqSnYj9wG0H5WsEWwvVzuBEqUFC+AdxJ xjf6FqHXKyeJxouWcya2ncoPp2sMW9IK/2uXYX+gQ2/81UUShPb76iJX45/4dUtZRAO8JQrFLDgKm DZOUmnXg==; Received: from authenticated user by zero.zsh.org with local id 1nuQqC-0001Y4-Ce; Fri, 27 May 2022 03:40:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f47.google.com ([209.85.218.47]:39704) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nuQpb-0001FA-J8; Fri, 27 May 2022 03:40:09 +0000 Received: by mail-ej1-f47.google.com with SMTP id gh17so6394052ejc.6 for ; Thu, 26 May 2022 20:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KXHdHViWCboPtSORB8j4GOehQ8chl8cl8KAVDOjGjNU=; b=dfy2yYGGarMIhk8ItlT5EkwSbQvjkuuzjxmX7iPJA1lm8EfPcKu+XGPyIq4146XuBP +NZIWirJLQMI8VK9FshcdaJ5xqyu4UD5BJECtD5cb89ndj3cZiT1tcaL3hY/pODtooXY IcjAXW8V/TOzGTvdt8bSIptV1DRrsoJhLiW0/nHEDNxzSxFF6Wwe1RLFO3d+uowXnZuY My+zZOFLqYlaTUeBaEF2lru1iP4kfWTkyal/O3fWzblu1RdKxSwyooVOYso8KA7baMwd p+YGuHZ6bnYQMwGtsDfUQ8vzUNPIs+PdIFE5adrsxaG94ij/K0GoYiCkryW+Jd1qsBKQ y0Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KXHdHViWCboPtSORB8j4GOehQ8chl8cl8KAVDOjGjNU=; b=6/A24U2ptxC1vf4aFP2x0lrbUJJolQboyezBbt8o8mjhGI7gg3BlKMd95nr0bYxrr4 Cun513pRSSdO2fOoUJadBEAJlfqevfPMwMUT+G782uA0Bx49Rri0FS5cwUbOHNBMJkWw aPH2rBIjlnv+kcYsmgVxEV+EyHzxS2zgTwHX+TXjIxr9XuurqgrGxEDoLEeODRbdPPIq 7GEAS90wXsnLJWRkAvReI8WB/WCo33W3piN/6hI1sCp8os96VWZTjIY1YkV3kV6wwoVO pPmE3ScMUYtW2xVwUtosFTkyseFDmIlNuEQQdpVuUvwEsdIph9MUG0fRdYBL3RD8fT6n FrOg== X-Gm-Message-State: AOAM530/pPqWJM7AqmEnE/i9/aui5jy8OzhRuXl41ZmeYnoYLr8tdArP PO+0vY+jPzIwmiuk9F9m3yDRl1Z7jQJOgOEnsw+cyA== X-Google-Smtp-Source: ABdhPJxr0JmYD+pWC0+2lP8hzHfbyqopwjlmHZAv+LgTKYrEj7yj+NtBFKANa8PO5w8kUdTvKc0QnfHi8fKGMJW2d5s= X-Received: by 2002:a17:907:7290:b0:6ff:1fa2:e9e3 with SMTP id dt16-20020a170907729000b006ff1fa2e9e3mr6569758ejc.345.1653622807187; Thu, 26 May 2022 20:40:07 -0700 (PDT) MIME-Version: 1.0 References: <9162a41e493cabeb0c8fb7c770f6b35035a0be0e@hey.com> In-Reply-To: From: Bart Schaefer Date: Thu, 26 May 2022 20:39:55 -0700 Message-ID: Subject: Re: zargs with -P intermittently failing in zsh 5.9 and macOS To: Jun T Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 50293 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 Thu, May 26, 2022 at 1:58 AM Jun T wrote: > > > 2022/05/25 2:32, Bart Schaefer wrote: > > > > Something is causing the subshell that was running f to exit with > > status 19 even though f returned 0. > > The problem can be reproduced by the following simplified script: Thanks. Is this limited to newer MacOS, like the nullexec test discussed in workers/50164 ? > ( # works OK if not run in a subshell Interesting. It may actually be possible to remove the subshell from zargs now (see below). > np=10 # try increasing this if you do not get $? = 19 > for ((i=0; i<$np; ++i)); do > curl -so /dev/null 'https://example.com' & _zajobs+=( $! ) > done I don't suppose you've found any indication of what 19 actually means, there. > #sleep 1 # works OK if 'sleep 1' is added here > wait # works OK if this line is commented out Hm. If that wait is removed, the subshell is probably not necessary. It's there because of a lingering concern that if we didn't first wait for all jobs to finish before starting the individual waits, we might get race conditions. It seems like perhaps the opposite is actually the case. > But all the "wait $p" return 0 if > (1) remove the "wait" before the "for p in $_zajobs", or > (2) add "sleep 1" before the "wait", or > > (1)(2) may indicate that the first "wait" (without $p) can't correctly > wait for some of the child procs...? That would be ... strange ... and would mean we might have to be on the lookout for "wait" failing in other cases too.