diff options
author | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2013-08-22 19:43:44 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-08-23 12:28:37 -0400 |
commit | 3dc6cedba55f3250175c56b913680d9bd7c9b1d4 (patch) | |
tree | 36b5f8edfea923196d1a5887ad3f5bc9d79e5648 /src/ostree/ot-builtin-trivial-httpd.c | |
parent | 4f127b2d7db3d28ac5d7a29c8e087be05b2df006 (diff) | |
download | ostree-3dc6cedba55f3250175c56b913680d9bd7c9b1d4.tar.gz |
trivial-httpd: Close stdout & stdin so $() can capture output when daemonized
Will be used by tests.
Diffstat (limited to 'src/ostree/ot-builtin-trivial-httpd.c')
-rw-r--r-- | src/ostree/ot-builtin-trivial-httpd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c index 178f20c5..3c8fff9b 100644 --- a/src/ostree/ot-builtin-trivial-httpd.c +++ b/src/ostree/ot-builtin-trivial-httpd.c @@ -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; |