From: Tom Hughes Date: Mon, 15 Jun 2009 11:34:23 +0000 (+0000) Subject: Stop the spawner switching to the root directory as it breaks the X-Git-Tag: live~7026 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/662ae3f6d8c6d166884334d27988e4191bbdfbaf Stop the spawner switching to the root directory as it breaks the ability of ActionMailer to auto-locate parts for multipart emails if the current working directoy is not the rails root. There is probably a better fix for this, but this will do for now... --- diff --git a/vendor/plugins/irs_process_scripts/lib/commands/process/spawner.rb b/vendor/plugins/irs_process_scripts/lib/commands/process/spawner.rb index 8bf47abb7..169072c41 100644 --- a/vendor/plugins/irs_process_scripts/lib/commands/process/spawner.rb +++ b/vendor/plugins/irs_process_scripts/lib/commands/process/spawner.rb @@ -7,7 +7,7 @@ def daemonize #:nodoc: exit if fork # Parent exits, child continues. Process.setsid # Become session leader. exit if fork # Zap session leader. See [1]. - Dir.chdir "/" # Release old working directory. +# Dir.chdir "/" # Release old working directory. File.umask 0000 # Ensure sensible umask. Adjust as needed. STDIN.reopen "/dev/null" # Free file descriptors and STDOUT.reopen "/dev/null", "a" # point them somewhere sensible.