RFR: JDK-8260485: Simplify and unify handler vectors in Posix signal code [v6]
Gerard Ziemski
gziemski at openjdk.java.net
Wed Feb 17 16:13:43 UTC 2021
On Wed, 17 Feb 2021 06:01:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/os/posix/signals_posix.cpp line 1222:
>>
>>> 1220: // Query the current signal handler. Needs to be a separate operation
>>> 1221: // from installing a new handler since we need to honor AllowUserSignalHandlers.
>>> 1222: void* oldhand = get_signal_handler(&oldAct);
>>
>> It's a pre-existing issue, but I dislike the **"old"** in **oldhand** and **oldAct**. It makes it sound like it is a cached or previous value, which is especially confusing when in the comment we refer to it as the **current** one. Any chance we can clean this up in this fix?
>
> I think it stems from the Posix interface calling the parameters `act` and `oact` and ppl are used to that naming:
> int sigaction(int sig, const struct sigaction *restrict act,
> struct sigaction *restrict oact);
> That said, we use a bunch of different names, like oact, oldAct or oldSigAct, which I disliked. I wanted to unify those namings but refrained since I wanted to keep the patch small. Its difficult enough as it is.
>
> Since this would be an easy change in itself, can we keep it for a different RFE? As for name, lets say currentAct?
I'd love if it we could follow up on it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2251
More information about the hotspot-dev
mailing list