trivial-httpd: Close stdout & stdin so $() can capture output when daemonized
Will be used by tests.
This commit is contained in:
1 parent
4f127b2d7d
commit
3dc6cedba5
1 file changed
+3
@@ -334,6 +334,9 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path, GCancella
|
|||||||
_exit (0);
|
_exit (0);
|
||||||
}
|
}
|
||||||
/* Child, continue */
|
/* Child, continue */
|
||||||
|
/* Daemonising: close stdout/stderr so $() et al work on us */
|
||||||
|
fclose (stdout);
|
||||||
|
fclose (stdin);
|
||||||
}
|
}
|
||||||
|
|
||||||
app->running = TRUE;
|
app->running = TRUE;
|
||||||
|
|||||||
Reference in new issue
Block a user