]> git.itanic.dy.fi Git - rrdd/blobdiff - process.c
process: tun_piped_stream: stdout stream should be writable
[rrdd] / process.c
index a54f3dd0ffb5dd00e00823d07b2c6f700ccdb7b0..96c93f822366eba06e18fbaf20c18181224de0e9 100644 (file)
--- a/process.c
+++ b/process.c
@@ -464,7 +464,7 @@ int run_piped_stream(const char *cmd, char *const argv[],
        }
 
        if (stdoutf) {
-               *stdoutf = fdopen(ofd, "r");
+               *stdoutf = fdopen(ofd, "w");
                if (*stdoutf == NULL) {
                        pr_err("Error opening file stream for fd %d: %m\n",
                               ofd);