哦该死,这是在 OpenSSH 的源代码中硬编码的。
来自 OpenSSH 5.9p1 源代码的 session.c:
/*
* Execute the command using the user's shell. This uses the -c
* option to execute the command.
*/
argv[0] = (char *) shell0;
argv[1] = "-c";
argv[2] = (char *) command;
argv[3] = NULL;
execve(shell, argv, env);
perror(shell);
exit(1);
Run Code Online (Sandbox Code Playgroud)
所以我想这是一个 POSIX 标准吧?