From 4b420d36cc628d98fd8edd999bfcc95cdec36469 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Tue, 30 Jul 2024 10:13:42 +0200 Subject: [PATCH] add comments --- src/main/java/jnr/posix/util/SunMiscSignal.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/jnr/posix/util/SunMiscSignal.java b/src/main/java/jnr/posix/util/SunMiscSignal.java index e29c65c..4c550d9 100644 --- a/src/main/java/jnr/posix/util/SunMiscSignal.java +++ b/src/main/java/jnr/posix/util/SunMiscSignal.java @@ -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;