about summary refs log tree commit homepage
path: root/t/heartbeat-timeout.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-01 01:15:01 -0700
committerEric Wong <normalperson@yhbt.net>2009-11-01 01:15:01 -0700
commit0af9343c98b7b8d9596b526b87fd5e67bb8c4a68 (patch)
tree1d5cd4f2de257a1dfe2998256bf012bdb3699ae5 /t/heartbeat-timeout.ru
parenta9d1fc829fc418c2e808955b9910004dff8ab769 (diff)
downloadrainbows-0af9343c98b7b8d9596b526b87fd5e67bb8c4a68.tar.gz
We need to resort to SIGSTOP to block off processes entirely
since 1.9 uses native threads.
Diffstat (limited to 't/heartbeat-timeout.ru')
-rw-r--r--t/heartbeat-timeout.ru5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/heartbeat-timeout.ru b/t/heartbeat-timeout.ru
index fff0c40..471bddc 100644
--- a/t/heartbeat-timeout.ru
+++ b/t/heartbeat-timeout.ru
@@ -4,8 +4,9 @@ headers = { 'Content-Type' => 'text/plain' }
 run lambda { |env|
   case env['PATH_INFO']
   when "/block-forever"
-    # this should block forever (or until somebody opens it for reading)
-    File.open(fifo, "rb") { |fp| fp.syswrite("NEVER\n") }
+    # one of these should block forever
+    Process.kill(:STOP, $$)
+    ::File.open(fifo, "rb") { |fp| fp.syswrite("NEVER\n") }
     [ 500, headers, [ "Should never get here\n" ] ]
   else
     [ 200, headers, [ "#$$\n" ] ]