]> git.itanic.dy.fi Git - rrdd/commitdiff
Open read streams for reading
authorTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 16:28:18 +0000 (19:28 +0300)
committerTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 16:28:18 +0000 (19:28 +0300)
process.c

index 068550f4abaf15d349541db0e1033caf780082da..376caa31de428630353592591a0b4e8f63f0d45f 100644 (file)
--- a/process.c
+++ b/process.c
@@ -176,7 +176,7 @@ int run_piped_stream(const char *cmd, char *const argv[],
        }
 
        if (stdoutf) {
-               *stdoutf = fdopen(ofd, "w");
+               *stdoutf = fdopen(ofd, "r");
                if (*stdoutf == NULL) {
                        error = errno;
                        pr_err("Error opening file stream for fd %d: %s\n",
@@ -186,7 +186,7 @@ int run_piped_stream(const char *cmd, char *const argv[],
        }
 
        if (stderrf) {
-               *stderrf = fdopen(efd, "w");
+               *stderrf = fdopen(efd, "r");
                if (*stderrf == NULL) {
                        error = errno;
                        pr_err("Error opening file stream for fd %d: %s\n",