I have a watch that I let god daemonize (I don't specify the pid
directory). It works very well, except the process has a few places
where it opens files using relative paths, so I'd like the process to
have the same working directory as wherever the user starts god from.
I've tried setting ENV['PWD']  as well as watch.env['PWD'], and these
pass the environment variable to the daemonized process, but inside
the process, running `pwd` fails.

I tried patching process.rb with something like:
<code>Dir.chdir(ENV['PWD']) if ENV['pwd']</code>
inside spawn, in the loop where it copies env to ENV, but `pwd` in the
spawned process still reports '/' (which isn't what `pwd` in the god
process reports).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to