Josh Morrow <[email protected]> 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')
end
Fwiw, we switched to checking stdin last year so SIGWINCH could
be usable with foreman and other process managers:
https://bogomips.org/unicorn-public/etPan.555b4293.5b47a5b7.e617@danbookpro/T/
--
unsubscribe: [email protected]
archive: https://bogomips.org/unicorn-public/