public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Respawn processes killed with kill -9
wycats (author)
Thu Sep 25 23:22:17 -0700 2008
commit  27779e1f857c3555c87451a1011bbeee646fa1f5
tree    2f55b2eacaf2b501dffe9962c4774af332f844c1
parent  f4fd0d39ea76e1722ee115f15f307732603d7ce4
...
66
67
68
69
 
 
 
 
 
 
 
70
71
72
...
66
67
68
 
69
70
71
72
73
74
75
76
77
78
0
@@ -66,7 +66,13 @@ module Merb
0
                   # (we send back a status of 128 when ABRT is called on a 
0
                   # child, and Merb.fatal! exits with a status of 1), or if
0
                   # Merb is in the process of exiting, *then* don't respawn.
0
-                  Thread.exit if !status || status.exitstatus != 0 || Merb.exiting
0
+                  # Note that processes killed with kill -9 will return no
0
+                  # exitstatus, and we respawn them.
0
+                  if !status || 
0
+                    (status.exitstatus && status.exitstatus != 0) || 
0
+                    Merb.exiting then
0
+                    Thread.exit
0
+                  end
0
                 end
0
               
0
                 # Otherwise, respawn the worker, and watch it again.

Comments