unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Josh Morrow <jcmorrow@thoughtbot.com>
Cc: unicorn-public@bogomips.org
Subject: Re: SIGWINCH with Forego/Heroku Local
Date: Thu, 8 Dec 2016 18:40:54 +0000	[thread overview]
Message-ID: <20161208184054.GA5417@starla> (raw)
In-Reply-To: <CAHdu2E5BX_fzNqrHxekOcfUYr4bLRWP90nC92eSRu_3HPToV8Q@mail.gmail.com>

Josh Morrow <jcmorrow@thoughtbot.com> wrote:
> Hello!
>  I've recently been using unicorn in my rails development environment,
> and it's been almost entirely great so far. I do have one question
> about how to address an issue: `WINCH` signals coming from my
> terminal. I run with the `heroku local` command, which runs
> https://github.com/ddollar/forego under the hood. Forego does not
> identify STDIN as a tty (because it's not really). This means that
> whenever I resize my terminal Unicorn attempts to stop all workers as
> per https://github.com/defunkt/unicorn/blob/3dbbda30f02a40025abdee395fb0803985046db6/lib/unicorn/http_server.rb#L297-L305.
> What is the correct way to fix this issue? Should something in Unicorn
> change? (perhaps we use some other criteria than stdin?)

Resetting the SIGWINCH handler to the default in the before_fork
handler will work:

	before_fork do |server, worker|
	  # runs in the master
	  trap(:WINCH, 'DEFAULT')

Fwiw, we switched to checking stdin last year so SIGWINCH could
be usable with foreman and other process managers:


  reply	other threads:[~2016-12-08 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 17:01 SIGWINCH with Forego/Heroku Local Josh Morrow
2016-12-08 18:40 ` Eric Wong [this message]
     [not found]   ` <CAHdu2E6=qv1gmLGbZfrivhX5vVYgMq7cwOpCZ9yvFGTR17Prfw@mail.gmail.com>
2016-12-09  1:55     ` Eric Wong
2016-12-09 17:01       ` Josh Morrow

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:

  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=20161208184054.GA5417@starla \
    --to=e@80x24.org \
    --cc=jcmorrow@thoughtbot.com \
    --cc=unicorn-public@bogomips.org \


* 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


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