about summary refs log tree commit homepage
path: root/test/exec/test_exec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/exec/test_exec.rb')
-rw-r--r--test/exec/test_exec.rb2
1 files changed, 2 insertions, 0 deletions
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 }