about summary refs log tree commit homepage
path: root/t/detach.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/detach.ru')
-rw-r--r--t/detach.ru11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/detach.ru b/t/detach.ru
new file mode 100644
index 0000000..bbd998e
--- /dev/null
+++ b/t/detach.ru
@@ -0,0 +1,11 @@
+use Rack::ContentType, "text/plain"
+fifo_path = ENV["TEST_FIFO"] or abort "TEST_FIFO not set"
+run lambda { |env|
+  pid = fork do
+    File.open(fifo_path, "wb") do |fp|
+      fp.write "HIHI"
+    end
+  end
+  Process.detach(pid)
+  [ 200, {}, [ pid.to_s ] ]
+}