Request for review: 6749267: Signal handler should save/restore errno

Karen Kinnear karen.kinnear at
Mon Feb 18 08:11:26 PST 2013


I missed that. In that case. The code looks great.


On Feb 18, 2013, at 10:58 AM, harold seigel wrote:

> Hi Karen,
> Thanks for reviewing this.  The existing SR_handlers for both linux and bsd already save and restore errno:
> static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) {
>   // Save and restore errno to avoid confusing native code with EINTR
>   // after sigsuspend.
>   int old_errno = errno;
>          ...
> Harold
> On 2/18/2013 10:51 AM, Karen Kinnear wrote:
>> Harold,
>> Thank you for doing this.
>> I think you also want to catch SR_handler - this is our suspend/resume handler. Today this is on
>> linux and bsd. An upcoming change will use that handler for more than just the VM Thread, and will support it on Solaris as well.
>> Copying Rickard/Staffan who will want to extend this change for the Solaris SR_handler when it arrives.
>> On Feb 18, 2013, at 9:07 AM, harold seigel wrote:
>>> Hi,
>>> Please review the following change.
>>> Summary: With this change, the actual signal handler saves the errno before calling the function that does most of the signal handling processing.  It then restores the value of errno when the signal handling processing function returns.
>>> Open webrev: <>
>>> Bug link at:
>>> The changes were tested with JPRT, JCK Lang and VM tests, UTE tests, and with JPRT.  Also, I used the debugger to change the value of errno inside of the signal handling processing method and then verified that it got restored properly.
>> Thank you for reporting what tests you ran. UTE tests - could you be more specific, that is just the framework.
>> We have some existing signal tests in the vmsqe tests - see runtime/signal/*.
>>> Thanks!  Harold
>> thanks,
>> Karen

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-runtime-dev mailing list