From 61d8e20732030c9a43ea266373bc778413e49b47 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Feb 2009 21:50:43 -0800 Subject: Use a short-as-possible path for worker Tempfiles These files are unlinked immediately anyways, so it's wasteful to give them a long name... --- lib/unicorn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index a33b1b2..0c3419b 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -331,7 +331,7 @@ module Unicorn return if @workers.size == @nr_workers (0...@nr_workers).each do |worker_nr| @workers.values.include?(worker_nr) and next - tempfile = Tempfile.new('unicorn_worker') + tempfile = Tempfile.new('') # as short as possible to save dir space tempfile.unlink # don't allow other processes to find or see it tempfile.sync = true worker = Worker.new(worker_nr, tempfile) -- cgit v1.2.3-24-ge0c7