unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Suggestion for reload action (USR2)
Date: Wed, 20 Jan 2010 20:03:43 +0000	[thread overview]
Message-ID: <20100120200343.GA9925@dcvr.yhbt.net> (raw)
In-Reply-To: <201001201020.23413.ibc@aliax.net>

Iñaki Baz Castillo <ibc@aliax.net> wrote:
> El Miércoles, 20 de Enero de 2010, Iñaki Baz Castillo escribió:
> 
> > This would involve just three changes:
> > 
> > - Add an option "--reload" in OptionParser in bin/unicorn.
> > - Store such option somewhere so it can be readed later by the Rack
> > application or other library.
> > - Add "--reload" to the list of original arguments when receiving USR2.

Hi Iñaki,

All you need to do is to check for the presence of ENV["UNICORN_FD"]
which is used to communicate file descriptor numbers for the upgrade
process

> I attach a patch (for master branch) that would do the job (except the 
> fact that I don't know how to store the "reload" option):

> (unfortunatelly I cannot attach files in this mailist as the mail is 
> rejected).

While the patch was not needed for this case, inline patches are strongly
preferred here.  Inline patches are far easier to read, reply-to and
apply than attachments.

-- 
Eric Wong
_______________________________________________
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-20 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20  9:20 Suggestion for reload action (USR2) Iñaki Baz Castillo
2010-01-20 20:03 ` Eric Wong [this message]
2010-01-20 20:22   ` Iñaki Baz Castillo
2010-01-20 20:58     ` Eric Wong
2010-01-21 11:20       ` Iñaki Baz Castillo
  -- strict thread matches above, loose matches on Subject: below --
2010-01-20  8:54 Iñaki Baz Castillo

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=20100120200343.GA9925@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --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).