diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-21 05:00:26 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-21 05:00:26 -0800 |
commit | ae224fadd90f6641a8584536531bc18c2c7e2ab9 (patch) | |
tree | 0da821d89f49446b7f51c3cc2c6140ecc79d7b5e /test/exec | |
parent | a19e220a9e000b730da92b9d9b5f76e6c7cc2ee1 (diff) | |
download | unicorn-ae224fadd90f6641a8584536531bc18c2c7e2ab9.tar.gz |
Apparently the at_exit handlers were not triggering for an execed process.
Diffstat (limited to 'test/exec')
-rw-r--r-- | test/exec/test_exec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 4e460e2..7a4e59b 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -8,8 +8,13 @@ require 'fileutils' do_test = true $unicorn_bin = ENV['UNICORN_TEST_BIN'] || "unicorn" -pid = fork { redirect_test_io { exec($unicorn_bin, '-v'); exit!(1) } } -Process.waitpid(pid) +redirect_test_io do + pid = fork do + exec($unicorn_bin, '-v') + exit(1) + end + Process.waitpid(pid) +end unless $?.success? STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\ "skipping this test" |