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

Will be used by tests.
This commit is contained in:
Vivek Dasmohapatra authored and Colin Walters committed 2013-08-23 12:28:37 -04:00
1 parent 4f127b2d7d
commit 3dc6cedba5
1 file changed
+3
+3
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;