You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/user/compatibility.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -141,15 +141,15 @@ Error message strings will sometimes differ from MRI, as these are not generally
141
141
142
142
### Signals
143
143
144
-
The set of signals that TruffleRuby can handle is different from MRI.
145
-
When using the native configuration, TruffleRuby allows trapping all the same signals that MRI does, as well as a few that MRI does not.
146
-
The only signals that can't be trapped are `KILL`, `STOP`, and `VTALRM`.
144
+
First, `KILL` and `STOP` can never be trapped, per POSIX (`man 2 signal`).
145
+
Some signals are reserved on CRuby, and they are also reserved on TruffleRuby, because trapping those would cause all sorts of problems: `SEGV`, `BUS`, `ILL`, `FPE` and `VTALRM`.
146
+
147
+
When using the native configuration, TruffleRuby allows trapping all the same signals that MRI does.
147
148
Consequently, any signal handling code that runs on MRI can run on TruffleRuby without modification in the native configuration.
148
149
149
-
However, when run on the JVM, TruffleRuby is unable to trap `USR1` or `QUIT`, as these signals are reserved by the JVM.
150
-
In such a case `trap(:USR1) {}` will raise an `ArgumentError`.
151
-
Any code that relies on being able to trap those signals will need to fall back to another available signal.
152
-
Additionally, `FPE`, `ILL`, `KILL`, `SEGV`, `STOP`, and `VTALRM` cannot be trapped, but these signals are also unavailable on MRI.
150
+
However, when run on the JVM, TruffleRuby is unable to trap `QUIT`, as this signal is reserved by the JVM.
151
+
In such a case `trap(:QUIT) {}` will raise an `ArgumentError`.
152
+
Any code that relies on being able to trap this signal will need to fall back to another available signal.
153
153
154
154
When TruffleRuby is run as part of a polyglot application, any signals that are handled by another language become unavailable for TruffleRuby to trap.
0 commit comments