How does shell_exec() pick which shell to use?

前端 未结 1 1502
滥情空心
滥情空心 2021-01-24 01:07

The question came up in another thread. Figured I would ask.

Shell Script Loop from PHP not working

相关标签:
1条回答
  • 2021-01-24 01:50

    If it uses popen(), that uses /bin/sh on Linux. The man page for popen() says:

    The command argument is a pointer to a null-terminated string containing a shell command line. This command is passed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell.

    /bin/sh is the only shell that POSIX guarantees will be available.

    0 讨论(0)
提交回复
热议问题