[Top][All Lists]
[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:13:07 -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:
#include <signal.h>
#ifdef SIGHUP
signame[SIGHUP] = "hup";
#endif
...
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.
Tim
Michael Beattie wrote:
>
> On Mon, Apr 22, 2002 at 11:22:58AM +0200, address@hidden wrote:
> >
> > Can anyone, with some spare time on their hands provide me with a
> > solution to this which does not depend on bash?
>
> /usr/include/signal.h
>
> Present on Digital Unix, Linux, Solaris, xxx ... Hell, even SCO.
> (/usr/include/sys/signal.h)
>
> Mike.
> --
> Michael Beattie <address@hidden>
>
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine
- Signal names, Tim Auckland, 2002/04/17
- Signal names with autoconf?, Mark . Burgess, 2002/04/23
- Re: Signal names with autoconf?, Michael Beattie, 2002/04/23
- Re: Signal names with autoconf?, Mark . Burgess, 2002/04/23
- Re: Signal names with autoconf?, Michael Beattie, 2002/04/23