[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the b
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function |
Date: |
Thu, 30 May 2013 21:34:59 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15 |
Follow-up Comment #6, bug #39089 (project octave):
I guess that strsignal isn't the complete list, just the BSD strings:
http://infohost.nmt.edu/~eweiss/222_book/222_book/0201433079/ch10lev1sec21.html
http://www.unix.com/man-page/all/3c/sig2str/
http://www.unix.com/man-page/all/3c/strsignal/
Anyway, I don't see where sys_siglist[] is used anywhere in the code. So
perhaps we could just remove siglist.h and siglist.c from Octave?
Also, we might be able to simplify the SIG routine so that make_sig_struct
doesn't require definitions. In the gnulib sig2str.c is this structure:
/* Signal names and numbers. Put the preferred name first. */
static struct numname { int num; char const name[8]; } numname_table[] =
{
/* Signals required by POSIX 1003.1-2001 base, listed in
traditional numeric order where possible. */
#ifdef SIGHUP
NUMNAME (HUP),
#endif
which is the exact same contents as make_sig_struct. Unfortunately, this a
local definition inaccessible to the project code. However, we could loop
through all signal numbers and use this routine to inquire for a name:
int
sig2str (int signum, char *signame)
i.e.,
for (int i=SIGRTMIN, i <= SIGRTMAX, i++)
{
char signame[SIG2STR_MAX];
if (! sig2str (i, signame))
m.assign (signame, i);
}
The consequence of that is that the structure will now be listed in numerical
order, not alphabetical. But we could use Octave's sort routine internally to
construct a new structure that is in alphabetical order.
I'll do that this evening if you think it is a good idea.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39089>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/27
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, John W. Eaton, 2013/05/30
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/30
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/30
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/30
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/30
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function,
Dan Sebald <=
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/31
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, Dan Sebald, 2013/05/31
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, John W. Eaton, 2013/05/31
- [Octave-bug-tracker] [bug #39089] Incomplete list of OS signals in the builtin SIG function, John W. Eaton, 2013/05/31