system("hash svn") and system("hash svn >/dev/null") return different values, because hash is shell built-in function and
If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this isPerldoc system/bin/sh -c
on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly toexecvp
, which is more efficient.
Комментариев нет:
Отправить комментарий