[Bug 220587] /bin/sh Incorrect options handling

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Aug 13 14:49:40 UTC 2017


Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
           Assignee|freebsd-standards at FreeBSD.o |jilles at FreeBSD.org
                   |rg                          |

--- Comment #9 from Jilles Tjoelker <jilles at FreeBSD.org> ---
(In reply to Ryan Moeller from comment #7)
I have committed your pre-fix tests. However, the options fix has various cases
where it ignores -c, which may lead to unexpected results (e.g. system("--")
will read commands from standard input). Whenever -c is given, commands must be
read from the command_string operand; if there is none, the invocation is
invalid and must fail.

I have added a test "invocation/sh-c-missing1.0" for the simplest "sh -c" case;
however, there are also "sh -c --", "sh -c -", "sh -c -- 'echo hi'" and "sh -c
- 'echo hi'".

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-standards mailing list