哪些 POSIX 系统接口依赖于 /bin/sh?
What POSIX system interfaces depend on /bin/sh?
POSIX系统接口
都使用/bin/sh
来执行外部程序。如果我在我的应用程序中使用它们,是否还有任何其他 POSIX 函数会引入对 /bin/sh
的依赖?
该列表至少包括:
popen()
system()
execlp()
和 execvp()
In the cases where the other members of the exec family of functions would fail and set errno to [ENOEXEC]
, the execlp()
and execvp()
functions shall execute a command interpreter and the environment of the executed command shall be as if the process invoked the sh
utility
wordexp()
(可能)
While wordexp()
could be implemented entirely as a library routine, it is expected that most implementations run a shell in a subprocess to do the expansion.
引用来自 POSIX.
POSIX系统接口
都使用/bin/sh
来执行外部程序。如果我在我的应用程序中使用它们,是否还有任何其他 POSIX 函数会引入对 /bin/sh
的依赖?
该列表至少包括:
popen()
system()
execlp()
和execvp()
In the cases where the other members of the exec family of functions would fail and set errno to
[ENOEXEC]
, theexeclp()
andexecvp()
functions shall execute a command interpreter and the environment of the executed command shall be as if the process invoked thesh
utilitywordexp()
(可能)While
wordexp()
could be implemented entirely as a library routine, it is expected that most implementations run a shell in a subprocess to do the expansion.
引用来自 POSIX.