First of all please note I've already reported this bug to the `glibc` maintainers: https://sourceware.org/bugzilla/show_bug.cgi?id=27143 Their response was (I'm pasting together multiple replies): ~~~~ Unfortunately, this bug is required by POSIX, which requires passing the string as an argument to the -c option of the shell. [...] POSIX specifies the exact value of the -c argument. The manual pages are maintained as a separate project: https://www.kernel.org/doc/man-pages/ ~~~~ Therefore I'm opening a feature request here for the `system(3)` man page. As such may I suggest adding a note in the `bugs` section of the man page that states something on the lines: ~~~~ If the command starts with a hyphen (as in `-some-tool`), due to the way `system(3)` is implemented in `glibc` and the way `sh(1p)` interprets when invoked as `sh -c -some-tool`, such a command will fail with an undefined behaviour. A simple workaround for such a situation is to always prefix your commands with a space when such a command would start with a hyphen. ~~~~
OK, I've opened an issue on the POSIX bug tracker: https://www.austingroupbugs.net/view.php?id=1440