Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Jul 30, 2024
1 parent 8e70fa0 commit 4b420d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/jnr/posix/util/SunMiscSignal.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ public static SignalHandler signal(jnr.constants.platform.Signal sig, final Sign
sun.misc.SignalHandler oldHandler = Signal.handle(s, new SunMiscSignalHandler(handler));

if (oldHandler instanceof SunMiscSignalHandler) {
// previous custom handler
return ((SunMiscSignalHandler)oldHandler).handler;
} else if (oldHandler != null) {
// default handler
return any -> oldHandler.handle(s);
} else {
return null;
Expand Down

0 comments on commit 4b420d3

Please sign in to comment.