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...
This commit is contained in:
Tom Hughes 2009-06-15 11:34:23 +00:00
parent 719a06fdfa
commit 662ae3f6d8

View file

@ -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.