> Hi skaar,
> 
> Does having this in the Unicorn config file work for you?
> 
>   stash_env = %w(PATH RUBYOPT).map { |x| [ x, ENV[x] ] }
>   before_exec do |_|
>     stash_env.each { |(k,v)| ENV[k] = v }
>   end
> 
> It's more generic and less surprising for people that (may) want
> to change environment variables on upgrades:
 
yep, that does the job just fine - thanks.

> Early versions of Unicorn actually captured the entire ENV at startup
> and restored it before exec.  I felt it was too heavy-handed since I
> figured any process that changed its environment variables has good
> reason to do so, so I've been trying to leave as much alone as
> possible...

the approach of just stashing what you need from ENV as above is by far
a better approach than just forcing in the reexec code.

thanks again
-- 
/skaar

sk...@waste.org
where in the W.A.S.T.E is the wisdom
s_u_b_s_t_r_u_c_t_i_o_n
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to