]> git.itanic.dy.fi Git - rrdd/commitdiff
process: run: Fix bug with multi-line prints
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 28 Oct 2014 19:25:40 +0000 (21:25 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 28 Oct 2014 19:25:40 +0000 (21:25 +0200)
Once newlines are replaces with NULLs for printing, we must start the
next line after the NULL. Without this all extra printout lines are
zero in length.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
process.c

index 3b107008cf9f63c8430f80b2e40096f6faf3ff8d..7de41b9abc2262908c543f36619bb871e73fffed 100644 (file)
--- a/process.c
+++ b/process.c
@@ -658,7 +658,7 @@ print:
                                else
                                        pr_info("%s: stdout: %s\n",
                                                cmd, sptr);
-                               sptr = eptr;
+                               sptr = eptr + 1;
                        }
                        eptr++;
                }