While working on JDK-8260485, I tried to add a bit more const correctness with the sigaction structures handed around; while doing that, I noticed that `call_chained_handler` actually modifies the content of the sigaction structure it gets handed.
This is not good style, especially since this function is called also for the libjsig case, where the sigaction pointer points into memory owned by the libjsig.
We do this for two reasons, one is to just have a holder for a temporary sigset, which would be trivial to fix with a temporary local variable. And then, to switch off chaining for SA_NODEFER (mimicking one shot semantics). That would be a bit more difficult to implement, especially taking into consideration the libjsig case.
This is not good style, especially since this function is called also for the libjsig case, where the sigaction pointer points into memory owned by the libjsig.
We do this for two reasons, one is to just have a holder for a temporary sigset, which would be trivial to fix with a temporary local variable. And then, to switch off chaining for SA_NODEFER (mimicking one shot semantics). That would be a bit more difficult to implement, especially taking into consideration the libjsig case.
- relates to
-
JDK-8260485 Simplify and unify handler vectors in Posix signal code
-
- Resolved
-