-
Notifications
You must be signed in to change notification settings - Fork 3k
Add missing POSIX sig2str(3) & str2sig(3) calls #1696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tested with:
|
e1b5058
to
4b5d6cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should put the new functions into a new source file, in particular due to stdio use, as you noted.
f19e29b
to
1e77d5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsdimp please review and push
Could I ask you to please rewrite your test to use libatf-c, expand it to cover as many cases (including errors) as possible, and include it in the PR? (give it a name that ends in |
Sure, I could do that. I have some experience with ATF on NetBSD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also consider adding SSP instrumentation, see for instance d0b7445 which added instrumentation for realpath()
which, like sig2str()
, has an implied buffer size.
Additionally, in BTW, both times |
In |
6c878f2
to
733c7e4
Compare
a63aa06
to
5360d85
Compare
d31b9dc
to
a840ae5
Compare
|
Signed-off-by: Ricardo Branco <rbranco@suse.de>
sig2str(3)
I think this is ready to go and all the feedback has been addressed. Is that assessment correct? |
Automated message from ghpr: Thank you for your submission. This PR has been merged to FreeBSD's branch. These changes will appear shortly on our GitHub mirror. |
Reviewed by: imp, kib, des, jilles Pull Request: #1696
Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: imp, kib, des, jilles Pull Request: #1696
Reviewed by: imp, kib, des, jilles Pull Request: #1696
Reviewed by: imp, kib, des, jilles Pull Request: #1696
Reviewed by: imp, kib, des, jilles Pull Request: #1696
Reviewed by: imp, kib, des, jilles Pull Request: #1696
Add
sig2str(3)
&str2sig(3)
calls defined in POSIX 1003.1-2024:Also add needed
SIG2STR_MAX
definition:Alternative implementations:
Notes:
SIG2STR_MAX
here to use32
as defined by IllumosNext steps could be:
kill
,fuser
and other tools that need translation between signal names & numbers.NSIG_MAX
in<limits.h>
Fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286714