Skip to content

Conversation

adityachopra29
Copy link
Contributor

Creates implementation stub for signal() using sigaction.

Creates implementation stub for signal() using sigaction.

Signed-off-by: Aditya Chopra <adityachopra2912@gmail.com>
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Sep 2, 2025
@zephyrbot zephyrbot requested review from cfriedt and ycsin September 2, 2025 20:43
Copy link

sonarqubecloud bot commented Sep 2, 2025

@adityachopra29
Copy link
Contributor Author

adityachopra29 commented Sep 2, 2025

Note : I have attempted to create a wrapper around the sigaction() function for signal, but since all these function only have stubs, I was not sure how to test them. Moreover, since there already exists a test to check existence of the function at tests/posix/headers/src/signal_h.c, and I did not find tests for anything else regarding the same, I have not added any tests.

Do let me know if any tests need to be added.

@cfriedt
Copy link
Member

cfriedt commented Sep 3, 2025

@adityachopra29 - if it's just a stub, then it would probably make sense to simply return SIG_ERR and set errno to ENOSYS.

Also, given that signal() is a c89 function, it would probably make sense to move this under the common libc rather than under POSIX.

@cfriedt cfriedt added area: C Library C Standard Library and removed area: POSIX POSIX API Library labels Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C Library C Standard Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants