RTEMS | signal() should return SIG_ERR on error (!406)

yang zhang (@yang.zhang) gitlab at rtems.org
Sat Feb 8 02:35:48 UTC 2025



yang zhang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/406

Project:Branches: yang.zhang/rtems:fix_signal_error to rtems/rtos/rtems:main
Author:   yang zhang




## Summary

As described in the signal posix manual, `signal()` returns the previous value of the signal handler, or `SIG_ERR` on error.  In the event of an error, `errno` is set to indicate the cause.

So we should check the return code of `sigaction()`, and return the appropriate value.
<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/406
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250208/1197a6ca/attachment.htm>


More information about the bugs mailing list