[rrd-developers] Re: BUG: attempt to put segment in horiz list twice ??
Ruud H.G. van Tol
rvtol at isolution.nl
Wed Jul 27 18:32:08 MEST 2005
> when I use "rrdtool graph -"
I read news://news.gmane.org/gmane.comp.db.rrdtol.user later
and saw how you use rrdtool.
> The code that produces good PNGs but make the browser hang:
> oldstdout=dup(1); // take a copy of stdout
> dup2(s,1); // make stdout = s
> close(2); // close stderr
> system(buffer); // call rrdtool to do the biz.
> dup2(oldstdout,1); // restore stdout.
You shouldn't close stderr, but redirect it somewhere, like to a file or
Is the command-string in 'buffer' properly terminated with a 0-byte?
Or *maybe*, as an alternative way to restore stderr, leave all that code
as is, but replace the line with "dup2(oldstderr,2);" by:
which I copied from:
>> In a system() call, you can append " 2>$tmpfile" to the commandline.
> Yeah, I did think of that too - I'll have to try it again, but I
> think it produced the same result (browser hangs).
Do a test with "rrdtool graph - 2>/dev/null"
and also test "2>/dev/null rrdtool graph -"
Which shell do you use?
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
More information about the rrd-developers