From nobody Sun Oct 16 05:09:15 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mqp7v3w4tz4fL76 for ; Sun, 16 Oct 2022 05:09:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mqp7v2R7Yz3mSd for ; Sun, 16 Oct 2022 05:09:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mqp7v1Vq0zM6q for ; Sun, 16 Oct 2022 05:09:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 29G59FPZ027368 for ; Sun, 16 Oct 2022 05:09:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29G59FrK027367 for bugs@FreeBSD.org; Sun, 16 Oct 2022 05:09:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 267111] xargs returns incorrect exit code when run in parallel mode Date: Sun, 16 Oct 2022 05:09:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: duliujimmy@hotmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665896955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pzxVu9v51nQQ6cyUVMWnxBz165JXqOYXgqRU90DEplU=; b=Y3P8Buc9gx5Run6F+NtWEly+kPqUshlKy8WhWPR6fv+B+vsf8Dnf3+YLbg1gmTxENcJwdD Hxq+aqMBMPeDkjdajEGSu6IKSU9LvJySwjXKO30kJVH7aOjuddsgba2oxieif7FfHAQGQJ pc5ldT971IgiWQDi7TPn6k6rtAtla5S+hVBbZaAjUkWW6RQ5D+BYh5uy8fnPQ0J+sEGyjg lqwvQ1KfiHXuouRkkxHjvco/AFVW+smSBmTBpdjhHDIG+DkcdQCWkQZXQDlRdbO+UmrrK0 fzsbOY/riU0IYt+2+8IPQVdeV4IR8UDkaK9HW1uplt6nXmFcT2Ip298Gx4jFTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665896955; a=rsa-sha256; cv=none; b=OS+seTi0BB0eWWNRCpd94COshEE2hXBl+HoQ4hoLS+23SBz5v6IjEDuL7Bs6jCzfzd/Y93 4TZ+w+vnXvS0glREUKnHGXKVEpiyiddKCrdXaGGZ2ERasRQ1FmmjpMetr6hilk3pK2FoYc WxXIOzmU5KXdd1pcB03N+FNVccofq4Z76boxi8LrNzgQcIb1/op8VwKaVTvF4eN/PLIzYN 9+aXboNNbhJAjpwnGoMSfTrsLTw9QMgeCB7Pw0CRTkRI99LQGHL+Gllyrz8UbOZRtuXA5N 6ezZFlct5QLect/+BiY2C37ugdwDDS4WZJaTfKX9714N8rj5RHTsALQBoJFOcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267111 Bug ID: 267111 Summary: xargs returns incorrect exit code when run in parallel mode Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: duliujimmy@hotmail.com when xargs runs in parallel mode (using -P flag), it may sometimes return incorrect exit code.=20 The following code shows current (incorrect) behaviour: /bin directory exis= ts, /foo directory does not exist. `echo /bin /foo | xargs -n1 -P2 test -d` sometimes return 0 sometimes return 1: ``` root@freebsd:~ # test -d /bin root@freebsd:~ # echo $? 0 root@freebsd:~ # test -d /foo root@freebsd:~ # echo $? 1 root@freebsd:~ # echo /bin /foo | xargs -n1 -P2 test -d root@freebsd:~ # echo $? 0 root@freebsd:~ # echo /bin /foo | xargs -n1 -P2 test -d root@freebsd:~ # echo $? 1 root@freebsd:~ # echo /bin /foo | xargs -n1 -P2 test -d root@freebsd:~ # echo $? 0 ``` --=20 You are receiving this mail because: You are the assignee for the bug.=