trivial-httpd: Close stdout & stdin so $() can capture output when daemonized

Will be used by tests.
This commit is contained in:
Vivek Dasmohapatra 2013-08-22 19:43:44 +01:00 committed by Colin Walters
parent 4f127b2d7d
commit 3dc6cedba5

View File

@ -334,6 +334,9 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path, GCancella
_exit (0);
}
/* Child, continue */
/* Daemonising: close stdout/stderr so $() et al work on us */
fclose (stdout);
fclose (stdin);
}
app->running = TRUE;