workaround rbx not reopening logs to stderr/stdout
commit13dc5b88cde691cc4e105de04ebb7804ae633ae6
authorEric Wong <normalperson@yhbt.net>
Tue, 15 Jun 2010 23:17:33 +0000 (15 23:17 +0000)
committerEric Wong <normalperson@yhbt.net>
Tue, 15 Jun 2010 23:25:17 +0000 (15 23:25 +0000)
treec66df3ad8dfa2b5dd3e9517adf9696e82bfbd102
parent43175d4fe36f91a28563a8cbf46160ee076de31c
workaround rbx not reopening logs to stderr/stdout

While log reopening worked reliably for newly-created File
objects in the unit tests, the $stderr and $stdout handles that
get redirected did not get reopened reliably under Rubinius.

We work around this by relying on Rubinius internals and
directly setting the @path instance variable.  This is harmless
for MRI and should be harmless for other any other Ruby
implementations we'll eventually support.

ref: http://github.com/evanphx/rubinius/issues/360
lib/unicorn.rb
lib/unicorn/util.rb
t/t0006-reopen-logs.sh [new file with mode: 0755]
t/t0006.ru [new file with mode: 0644]