From: "nobu (Nobuyoshi Nakada)" Date: 2013-08-25T17:19:21+09:00 Subject: [ruby-core:56803] [ruby-trunk - Bug #8816] Tempfile.new may return the same name for parallel calls Issue #8816 has been updated by nobu (Nobuyoshi Nakada). Tempfile.create may help you to create unique file name, but it's you task to guarantee that it doesn't conflict. ---------------------------------------- Bug #8816: Tempfile.new may return the same name for parallel calls https://bugs.ruby-lang.org/issues/8816#change-41342 Author: 375gnu (Hleb Valoshka) Status: Third Party's Issue Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN Two simultaneous call to Tempfile.new may return the same name. This may lead to race conditions. There some examples of such races (unix socket can't be unlinked because it was unlinked by another test case): https://buildd.debian.org/status/fetch.php?pkg=ruby-kgio&arch=ia64&ver=2.8.0-1&stamp=1376819434 https://buildd.debian.org/status/fetch.php?pkg=ruby-kgio&arch=kfreebsd-i386&ver=2.8.0-1&stamp=1376820662 -- http://bugs.ruby-lang.org/