t/lib.perl: fix Perl integration tests w/o installation
[unicorn.git] / t / detach.ru
blob8d359515a6ea0f43a29fcd4152c83109a21cc1e0
1 # frozen_string_literal: false
2 use Rack::ContentType, "text/plain"
3 fifo_path = ENV["TEST_FIFO"] or abort "TEST_FIFO not set"
4 run lambda { |env|
5   pid = fork do
6     File.open(fifo_path, "wb") do |fp|
7       fp.write "HIHI"
8     end
9   end
10   Process.detach(pid)
11   [ 200, {}, [ pid.to_s ] ]