diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-20 02:21:44 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-20 02:21:44 +0000 |
commit | 7f721b1608882afa15c28be0ec6071fb1e4e5872 (patch) | |
tree | 63e788d45be786149c0d359f0dc3e65772b16f21 | |
parent | f8156e239ea4da4cbcd020f24bf06c4fb9e7cde7 (diff) | |
download | mogilefs-client-7f721b1608882afa15c28be0ec6071fb1e4e5872.tar.gz |
-rw-r--r-- | test/exec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/exec.rb b/test/exec.rb index d84713e..6a6c832 100644 --- a/test/exec.rb +++ b/test/exec.rb @@ -38,6 +38,11 @@ module TestExec $stdout.reopen(out.path, "a") out.close err.close + ObjectSpace.each_object(Tempfile) do |tmp| + next if tmp.closed? + ObjectSpace.undefine_finalizer(tmp) + tmp.close_on_exec = true if tmp.respond_to?(:close_on_exec=) + end exec(*cmd) end _, status = Process.waitpid2(pid) |