unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: skaar <skaar@waste.org>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: unicorn/reexec/bundler/cap deploy issue
Date: Sun, 3 Jan 2010 11:08:02 -0600	[thread overview]
Message-ID: <20100103170802.GE18964@waste.org> (raw)
In-Reply-To: <20100103002544.GB13826@dcvr.yhbt.net>

> 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

skaar@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	other threads:[~2010-01-03 17:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-02 22:59 unicorn/reexec/bundler/cap deploy issue skaar
2010-01-03  0:25 ` Eric Wong
2010-01-03 17:08   ` skaar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-02 18:29 skaar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100103170802.GE18964@waste.org \
    --to=skaar@waste.org \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).