[rrd-developers] Re: Exiting of programs during an rrd_update

Tobi Oetiker tobi at caida.org
Wed Jul 14 23:29:25 MEST 1999


Today you sent me mail regarding Re: [rrd-developers] Re: Exiting of...:

*> I would think that signal handlers would be installed upon
*> entry to rrd_update and rrd_create and exit of the subroutine.
*> 
*> Ideally, it would be smart enough to only set the handler when
*> a write is about to happen and then remove the handler only if
*> it was set.
*> 
*> Is there a way for the signals to be defered until the completion
*> of rrd_update or rrd_create instead of ignoring them?

yes I think this could be done by storing them in a static variable ... 
and abort after the critical section if a signal has been received ... 

BUT ... as rrdtool will not be running interactively I do not see much need
for this ... but I will certainly accept a patch ...

cheers
tobi

*> 
*> Blair
*> 
*> 
*> Tobi Oetiker wrote:
*> > 
*> > Today you sent me mail regarding Exiting of programs during an rrd_update:
*> > 
*> > *> I have one more thing that I'd like thought about before the
*> > *> final release of RRDtool.
*> > *>
*> > *> What happens to an RRD file if the program running rrd_update
*> > *> is control-c during an rrd_update.  Can the file be corrupted
*> > *> or screwed up in any way?  If so, I'd like to see rrd_update
*> > *> potentially open writing to a temporary file, create the
*> > *> file, close the file, and then do a rename to the final
*> > *> name.  In this way if anything goes wrong before the
*> > *> rename, no data is lost or screwed up.
*> > 
*> > Hi Blair,
*> > 
*> > the tmp file aprocah is not a solution at this would defeat the whole point
*> > of round robin archives where the file is EDITED insted of rewritten ...
*> > 
*> > We could put a signal handler in there which made rrd_update and rrd_create
*> > ignore all signals when it executes the fwrites ...
*> > 
*> > cheers
*> > tobi
*> > 
*> > *>
*> > *> Comments,
*> > *> Blair
*> > 
*> > --
*> >  ______    __   _
*> > /_  __/_  / /  (_) Oetiker, hacking RRDTOOL&MRTG @  Caida for the Summer
*> >  / // _ \/ _ \/ / +1 619 822 0882 / tobi at caida.org / www.caida.org/~tobi
*> > /_/ \.__/_.__/_/ _______________________________________________________
*> > 
*> > --
*> > * To unsubscribe from the rrd-developers mailing list, send a message with the
*> >   subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, hacking RRDTOOL&MRTG @  Caida for the Summer
 / // _ \/ _ \/ / +1 619 822 0882 / tobi at caida.org / www.caida.org/~tobi
/_/ \.__/_.__/_/ _______________________________________________________


-- Binary/unsupported file stripped by Listar --
-- Type: TEXT/X-VCARD
-- File: bzajac.vcf
-- Desc: Card for Blair Zajac


--
* To unsubscribe from the rrd-developers mailing list, send a message with the
  subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch



More information about the rrd-developers mailing list