Skip to content

Commit

Permalink
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/src/main/java/org/jruby/RubySignal.java
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@

import org.jruby.anno.JRubyMethod;
import org.jruby.anno.JRubyModule;
import org.jruby.platform.Platform;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.SignalFacade;
@@ -52,6 +53,17 @@ private final static SignalFacade getSignalFacade() {
}

public static void createSignal(Ruby runtime) {
// We force java.lang.Process et al to load so that JVM's CHLD handler can be
// overwritten by users (jruby/jruby#3283)
if (!Platform.IS_WINDOWS) {
try {
Class.forName("java.lang.Process");
Class.forName("java.lang.UNIXProcess");
} catch (Throwable t) {
// if we can't access Process, other things will fail anyway; ignore for now
}
}

RubyModule mSignal = runtime.defineModule("Signal");

mSignal.defineAnnotatedMethods(RubySignal.class);

0 comments on commit 627d84c

Please sign in to comment.