On Thu, 3 Apr 2003, Markus Baertschi wrote: > Date: Thu, 03 Apr 2003 22:31:49 +0200 > From: Markus Baertschi <[EMAIL PROTECTED]> > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Subject: [rrd-developers] rrdtool libraries segfault with getopt > > > I'm developping an app in C which is calling rrd_update and rrd_create > directly (linking with librrd). So far things are working, but there > is a problem if I mix calls to rrd_create and rrd_update. The rrd_update > call generates a segfault and my app is dead :-(. >
[ snip ] > > Any ideas ? This is one of the things the thread-safety stuff tries to solve as well. Thus you might want to use the 1.1 development tree. There the trick is to use rrd_create_r and rrd_update_r. These functions bypass getopt. You only have to call rrd_clear_error before you call any of the *_r functions. I _think_ you do not even need the entire thread-safety stuff (ie. linking with librrd_th and libpthread) and it should work with librrd as well. peter -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
