On Tue, Dec 25, 2012 at 02:17:10PM +0000, Jilles Tjoelker wrote:
> Author: jilles
> Date: Tue Dec 25 14:17:09 2012
> New Revision: 244682
> URL: http://svnweb.freebsd.org/changeset/base/244682
> 
> Log:
>   sh: Prefer strsignal() to accessing sys_siglist directly.
>   
>   Accessing sys_siglist directly requires rtld to copy it from libc to the sh
>   executable's BSS. Also, strsignal() will put in the signal number for
>   unknown signals (FreeBSD-specific) so we need not do that ourselves.
>   
>   Unfortunately, there is no function for sys_signame.

Yes, that would be very handy.

BTW.

> +             sigstr = strsignal(i);
> +             if (sigstr != NULL)
> +                     strcpy(statestr, sigstr);
>               else
>                       strcpy(statestr, "Suspended");

When strsignal(3) can return NULL?

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

Attachment: pgpm9dGyE6RA6.pgp
Description: PGP signature

Reply via email to