svn commit: trunk/busybox: coreutils libbb procps

Denys Vlasenko vda.linux at googlemail.com
Tue Dec 4 10:06:47 UTC 2007


On Monday 03 December 2007 21:58, Mike Frysinger wrote:
> On Tuesday 01 May 2007, vda at busybox.net wrote:
> > Author: vda
> > Date: 2007-05-01 13:07:29 -0700 (Tue, 01 May 2007)
> > New Revision: 18534
> >
> > Log:
> > test: code size saving, no logic changes
> > ps: fix warning, make a bit smaller
> > kill -l: make smaller & know much more signals
> >
...
> > +static const char signals[32][7] = {
> > +	[0] = "EXIT",
> > +#ifdef SIGHUP
> > +	[SIGHUP   ] = "HUP",
> > +#endif
> > +#ifdef SIGINT
> > +	[SIGINT   ] = "INT",
> > +#endif
...
> > +#ifdef SIGPWR
> > +	[SIGPWR   ] = "PWR",
> > +#endif
> > +#ifdef SIGSYS
> > +	[SIGSYS   ] = "SYS",
> > +#endif
> >  };
>
> while this would be nice, the code relies on extended assumptions which the
> POSIX spec does not require and in some cases, this fails
>
> consider HPPA who defines SIGSTKFLT as 36 ... this define isnt in POSIX and
> is clearly beyond the "32" limit here ... and SUSv3 does not state that
> `kill` needs to support this signal ...
>
> perhaps the #if checks should be changed to something like:
> #if defined(SIGSTKFLT) && SIGSTKFLT < KILL_MAX_SIG
> and we'll change the array to:
> #define KILL_MAX_SIG 32
> static const char signals[KILL_MAX_SIG][7] = {
> -mike


Fixed in svn, thanks.
--
vda



More information about the busybox-cvs mailing list