process SIGWINCH unless stdin is a TTY
commita6077391bb62d0b13016084b0eea36b987afe8f0
authorEric Wong <e@80x24.org>
Wed, 20 May 2015 22:15:48 +0000 (20 22:15 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 May 2015 23:07:14 +0000 (20 23:07 +0000)
treeb670d05121fe444947e541f00bfd7d8801ea0953
parenta4de697505d95858e6bd62b3bc0474688a3522d7
process SIGWINCH unless stdin is a TTY

Some process managers such as foreman and daemontools rely on
unicorn not daemonizing, but we still want to be able to process
SIGWINCH in that case.

stdout and stderr may be redirected to a pipe (for cronolog or
similar process), so those are less likely to be attached to a TTY
than stdin.  This also allows users to process SIGWINCH when running
inside a regular terminal if they redirect stdin to /dev/null.

Reported-by: Dan Moore <dan@vaporwa.re>
References: <etPan.555b4293.5b47a5b7.e617@danbookpro>
<20150519232858.GA23515@dcvr.yhbt.net>
lib/unicorn/http_server.rb