[Bug 220587] /bin/sh Incorrect options handling

[email protected] Tue, 11 Mar 2025 16:39:23 +0000
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220587

Benjamin Takacs <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #19 from Benjamin Takacs <[email protected]> ---
(In reply to Martijn Dekker from comment #17)
POSIX requires  system(command);  to behave *as if*  sh -c -- command  was
called, for safety, because POSIX requires sh to handle options after -c.

I think the better design would be to only allow -c as last argument to sh, as
the SYNOPSIS in our man page says too, that would eliminate all bugs where
command could potentially start with -, without requiring everyone to write -c
-- or have a bug in waiting.

-- 
You are receiving this mail because:
You are on the CC list for the bug.