]> git.itanic.dy.fi Git - rrdd/commitdiff
process: tun_piped_stream: stdout stream should be writable
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 10 Oct 2020 08:58:23 +0000 (11:58 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 10 Oct 2020 08:58:23 +0000 (11:58 +0300)
Change the stream type to "w" so that it can be written.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
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) {
        }
 
        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);
                if (*stdoutf == NULL) {
                        pr_err("Error opening file stream for fd %d: %m\n",
                               ofd);