Skip to content

Commit e39cc98

Browse files
committed
Remove rogue exit(0) that shuts down JVM
For normal JRuby use, we let the main script finish and Main.main exits. If non-daemon threads remain running, they will keep the JVM alive. However a change for CRaC support accidentally introduced a hard exit(0) that is always encountered, even if the script did not request a hard exit using `exit` or similar Ruby calls. This patch removes the hard exit(0) so that "casual" exit from the main script does not force the JVM to shut down. The runtime will still be torn down as usual, but non-daemon threads can keep the JVM alive after JRuby itself has exited. Fixes jruby#8416
1 parent c5fb69e commit e39cc98

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

core/src/main/java/org/jruby/Main.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ public static void main(String[] args) {
199199
if (status.isExit()) {
200200
System.exit(status.getStatus());
201201
}
202-
203-
System.exit(0);
204202
}
205203
catch (RaiseException ex) {
206204
System.exit( handleRaiseException(ex) );

0 commit comments

Comments
 (0)