I don't know if this will help you, but it was the key to being able to call rrd_graph multiple times from the same program.
Try setting "optind" to 0 between calls (of course you will have to #include <getopt.h> to have optind defined properly). One of the side effects of the rrdX interfaces using getopt is that your arguments get reordered, with all the flags first and the parameters afterwards... so when you call the first time the arguments get reordered to rrdupdate -t 10... file.rrd tstamp:data (real values of course, my memory is not photographic). So, when you update argv[3] you are replacing the filename instead of the argument to -t (like you are thinking you are doing). So, you will also need to reorder your parameters to make sure that all your flags (like -t) are in the correct order when you call to avoid the reordering of your parameters (or take the performance penalty of completely filling all the argv values between calls). -- Frank Swasey | http://www.uvm.edu/~fcs Systems Programmer | Always remember: You are UNIQUE, University of Vermont | just like everyone else. === God Bless Us All === -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
