From 695954139e17e186d31b32f476048832994f0022 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 1 Mar 2009 20:01:37 -0800 Subject: test_exec: avoid mis-teardown just in case... Probably not a real bug, but test_exec has been experiencing mysterious failures.... --- test/exec/test_exec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 583c81d..6427453 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -81,9 +81,11 @@ end # after_fork @addr = ENV['UNICORN_TEST_ADDR'] || '127.0.0.1' @port = unused_port(@addr) @sockets = [] + @start_pid = $$ end def teardown + return if @start_pid != $$ Dir.chdir(@pwd) FileUtils.rmtree(@tmpdir) @sockets.each { |path| File.unlink(path) rescue nil } -- cgit v1.2.3-24-ge0c7