bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal names


From: Tim Auckland
Subject: Re: Signal names
Date: Mon, 22 Apr 2002 17:39:17 -0700

> > signal.h does not give you the strings for the signal names, just the
> > #defines for the numbers.  You have to put in a bit more work to get the
> > string-to-number mapping, but it's still do-able.
> >
> > Something like:
> ...
> > although there's probably a neater way.
> >
> > Cfengine also uses an enum somewhere in the signal name mapping code,
> > which would have to be dealt with similarly.
> 
> How about just using the #define's to give the right signal, when the
> name is used?
> 
> signal = hup
> 
> wherever it parses that, use SIGHUP. Then you can map symbolic names
> cfengine style, to SIGxxx #define values.
> 
> I would have thought that was the sensible method.
> 
> If I sound incoherent, thats because I usually am.

That would work too.  You can either generate tables, or use in-line
logic.  They are completely equivalent.  I was thinking tables because
that's the way cfengine is written at the moment, and I'm not familiar
enough with the code to know if other aproaches would be more efficient.

Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]