[rrd-users] RRDp.pm error weirdness

mike newton mike+rrdtool at delusion.org
Fri Jun 22 18:40:47 CEST 2007

well, i've "fixed" it for my purposes by changing RRDp.pm to "return
$ERR = 1" instead of just setting $ERR = 1 when $line matches ^ERROR. for my
immediate purposes this works, but i'm curious if this is a bug or my
misunderstanding of how this is supposed to work.


mike newton wrote:
> while recently trying to debug a problem i was having using RRDp i
> wanted to have a script act based on the error message received. when
> my script just hung i decided to take a step back and do something
> simple like the following and that also hung:
> RRDp::start "/usr/bin/rrdtool";
> $cmd = "create buh.rrd --step 60 DS:in:DERIVE:0:10000
> RRA:AVERAGE:0.5:1:120";
> $RRDp::error_mode = 'catch';
> RRDp::cmd $cmd;
> my $answer = RRDp::read;
> print $RRDp::error . "\n" if $RRDp::error;
> so i decided to look at RRDp.pm and i noticed that the error handling
> section sees the error and sets $ERR = 1 but doesn't return so it gets
> stuck in the while(1) waiting for something to tell it to return.
> am i missing something?
> thx!
> +m

More information about the rrd-users mailing list