Fix: do not close stdout/stderr in no-fork mode

This commit is contained in:
Stefan Bühler 2008-07-21 18:51:26 +02:00
parent dc27ffe949
commit 932809088d
1 changed files with 2 additions and 2 deletions

View File

@ -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;