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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
# frozen_string_literal: false
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