From nobody Sun Oct 22 16:55:33 2023 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 4SD4Fd5Hx1z4xXlc for ; Sun, 22 Oct 2023 16:55:33 +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 4SD4Fd3g9jz4YpD for ; Sun, 22 Oct 2023 16:55:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697993733; a=rsa-sha256; cv=none; b=RAA5XSn/rmomJCu6YRTGL+xA6s9BNasX3zuSlR2ckxiAe3e5GQd67n0JAezxR7wou69JLD LIROVJOPzSDBzVNQiYskFOKO7Ibe0jCyS+AYRb+FsosNp4iIQVAVXuFrQjpatvuHvaddt5 7OQeCtSBxLUASzY3t1A2qrSSlAeT/dopXuj5A8Ze7R1zJY+n3tmm5Zcw+GcAafKNYtBexW vtbYc6VgR7h1qkv1tc8HJkJS2E/jWg5nin03najk3yAh1PzLZ/CttliZ5rtwJADIVvLDEm H6Xtei5T7/vUjEaChdx643PfaoyzzsKTTS1djVpkXcg5AbHj0JkuOZb+rYJ9xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697993733; 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: in-reply-to:in-reply-to:references:references; bh=gSeFkBq4Uj6KPsHa36sn0xPyXXcWG02Yfpl7M5gVErk=; b=iDrcXaXxwtB0DSQyUayGy+AVCSj1pTyj7yHEe9WALmPomosg3xzH4hCQYK/6xjNIDZ/KoR Ub10d/X4pNHNZYDputCQ5KM0l9OwZr1K/9PZpDfe+OJaq1MHs1IRVmdPxVagtjfA2RhoIr e0CD67NAuGdrzy3hHMuW4AaXfAqbkA6Wxqskmgb5UJZYEdYDRn3TNwlR7rUy1q6U/E5XWN LF9Z+au82+frtSOGK3A1nu+1qEOT4O81M5uBQjjJSQIu0gCfTX9Ow6+za4y88vkmgzh7QE aqn9SRAfB24tz2qSeHvAbkZC3czEsNTKr8aFhg92QamkBTOhe94FpACcqT2zMQ== 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 4SD4Fd2dYhz155y for ; Sun, 22 Oct 2023 16:55:33 +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 39MGtX8i095951 for ; Sun, 22 Oct 2023 16:55:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39MGtXju095950 for bugs@FreeBSD.org; Sun, 22 Oct 2023 16:55:33 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 274650] sh does not accept -- after -c Date: Sun, 22 Oct 2023 16:55:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: nimaje+fbz@bureaucracy.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274650 Benjamin Takacs changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nimaje+fbz@bureaucracy.de --- Comment #1 from Benjamin Takacs --- FreeBSDs sh doesn't do any option parsing after -c, this makes accidents du= e to an unusual nammed command impossible and lead to the behaviour you observe. sh tries to run the command =C2=B4--=C2=B4 and uses =C2=B4echo $0=C2=B4 pro= viding =C2=B4arg=C2=B4 as argument. As you don't have any command named =C2=B4--=C2=B4 on your system sh report= s it with its name =C2=B4echo $0=C2=B4. That is POSIX incompatiple behaviour. I'm in favour of documenting this incompatibility and closing this report as =C2=B4Works As Intended=C2=B4 --=20 You are receiving this mail because: You are the assignee for the bug.=