diff --git a/src/org/jruby/RubyKernel.java b/src/org/jruby/RubyKernel.java
index d913a65..b2cb5dc 100644
--- a/src/org/jruby/RubyKernel.java
+++ b/src/org/jruby/RubyKernel.java
@@ -652,10 +652,13 @@ public class RubyKernel {
         }
 
         if (hard) {
-            throw new MainExitException(status, true);
-        } else {
-            throw runtime.newSystemExit(status);
+            // do our best to shut down the main thread, first by killing it
+            // outright and second by raising a MainExitException that should
+            // bubble out to either kill the main thread or be propagated by
+            // a child thread.
+            runtime.getThreadService().getMainThread().kill();
         }
+        throw runtime.newSystemExit(status);
     }
 
 
