|
|
|
@ -157,6 +157,7 @@ static const opt_struct OPTIONS[] = { |
|
|
|
{'R', 0, "allow-to-run-as-root"}, |
|
|
|
{'D', 0, "daemonize"}, |
|
|
|
{'F', 0, "nodaemonize"}, |
|
|
|
{'O', 0, "force-stderr"}, |
|
|
|
{'-', 0, NULL} /* end of args */ |
|
|
|
}; |
|
|
|
|
|
|
|
@ -918,7 +919,7 @@ static void php_cgi_usage(char *argv0) |
|
|
|
prog = "php"; |
|
|
|
} |
|
|
|
|
|
|
|
php_printf( "Usage: %s [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F]\n" |
|
|
|
php_printf( "Usage: %s [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F [-O]]\n" |
|
|
|
" -c <path>|<file> Look for php.ini file in this directory\n" |
|
|
|
" -n No php.ini file will be used\n" |
|
|
|
" -d foo[=bar] Define INI entry foo with value 'bar'\n" |
|
|
|
@ -937,6 +938,8 @@ static void php_cgi_usage(char *argv0) |
|
|
|
" -D, --daemonize force to run in background, and ignore daemonize option from config file\n" |
|
|
|
" -F, --nodaemonize\n" |
|
|
|
" force to stay in foreground, and ignore daemonize option from config file\n" |
|
|
|
" -O, --force-stderr\n" |
|
|
|
" force output to stderr in nodaemonize even if stderr is not a TTY\n" |
|
|
|
" -R, --allow-to-run-as-root\n" |
|
|
|
" Allow pool to run as root (disabled by default)\n", |
|
|
|
prog, PHP_PREFIX); |
|
|
|
@ -1569,6 +1572,7 @@ int main(int argc, char *argv[]) |
|
|
|
char *fpm_pid = NULL; |
|
|
|
int test_conf = 0; |
|
|
|
int force_daemon = -1; |
|
|
|
int force_stderr = 0; |
|
|
|
int php_information = 0; |
|
|
|
int php_allow_to_run_as_root = 0; |
|
|
|
|
|
|
|
@ -1697,6 +1701,10 @@ int main(int argc, char *argv[]) |
|
|
|
force_daemon = 0; |
|
|
|
break; |
|
|
|
|
|
|
|
case 'O': /* force stderr even on non tty */ |
|
|
|
force_stderr = 1; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
case 'h': |
|
|
|
case '?': |
|
|
|
@ -1824,7 +1832,7 @@ consult the installation file that came with this distribution, or visit \n\ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root, force_daemon)) { |
|
|
|
if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root, force_daemon, force_stderr)) { |
|
|
|
|
|
|
|
if (fpm_globals.send_config_pipe[1]) { |
|
|
|
int writeval = 0; |
|
|
|
|