svn commit: r244682 - head/bin/sh

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Dec 26 23:22:37 UTC 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20121227/cf06a326/attachment.sig>


More information about the svn-src-all mailing list