[Bug libc/27143] Calling `system("-some-tool")` fails (although it is a valid `sh` command)
ciprian.craciun at gmail dot com
sourceware-bugzilla@sourceware.org
Mon Jan 4 12:55:04 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=27143
--- Comment #2 from Ciprian Dorin Craciun <ciprian.craciun at gmail dot com> ---
> [...] this bug is required by POSIX [...]
OK, I might understand this, however I find it hard to believe that `glibc` can
do nothing about this...
For example one could:
(A) Update the `system(3)` `glibc` man page to warn the user that at the
moment there is a bug in the POSIX specification, and that any command starting
with `-` would in fact trigger a failure of `sh`.
(B) Update the `system(3)` implementation so that when a command starts with
`-` it prepends a space. This should have almost zero consequences because
spaces are allowed (and trimmed) by virtually all existing `sh` interpreters
out there.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list