unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob bbd998ebb2de4df6a7a615823532d2c9252c91cd 256 bytes (raw)
$ git show v4.5.0:t/detach.ru	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 ] ]
}

git clone https://yhbt.net/unicorn.git