Fix: do not close stdout/stderr in no-fork mode
This commit is contained in:
parent
dc27ffe949
commit
932809088d
@ -507,8 +507,6 @@ int main(int argc, char **argv) {
|
||||
g_option_context_add_main_entries(context, entries, NULL);
|
||||
g_option_context_set_summary(context, PACKAGE_NAME "-" PACKAGE_VERSION " - spawns fastcgi processes");
|
||||
|
||||
opts.close_fds = opts.no_fork ? opts.close_fds : !opts.keep_fds;
|
||||
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
||||
g_printerr("Option parsing failed: %s\n", error->message);
|
||||
return -1;
|
||||
@ -521,6 +519,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
/* Check options */
|
||||
opts.close_fds = opts.no_fork ? opts.close_fds : !opts.keep_fds;
|
||||
|
||||
if ((opts.fcgiapp && opts.args) || (!opts.fcgiapp && !opts.args)) {
|
||||
g_printerr("Specify either a fcgi application with -f or the application with arguments after '--'\n");
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user