forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Signal Handling
Charles Oliver Nutter edited this page Apr 5, 2016
·
4 revisions
JRuby supports the same Signal API that CRuby does, but there will be differences due to how various JVMs use those signals internally. Signals that are captured by the JVM will generally not be available for JRuby programs.
In some cases, as with Hotspot (OpenJDK/OracleJDK) there may be ways to reduce JVM signal usage (e.g. the -Xrs flag for Hotspot).
- Hotspot is known to use
SEGVin its garbage collector. - Hotspot may use
USR1andUSR2on some platforms. - Hotspot connects
INTto a JVM-wide hard shutdown. If you wish to capture this signal, you must trap it yourself; unlike CRuby, JRuby will not automatically bind it to anInterrupt-raising handler. - Platform-specific signals may not be mapped into JRuby, due to the fact that we have no per-platform compile phase.