travis-ci/travis-ci — Issue #349: Travis worker vulnerability
Author: nusco
Created: 2011-12-03 01:10:23+00:00
State: open

The tests in my Travisized project (nusco/cuukie) fork a separate process containing a Sinatra server. To avoid polluting the test console, they redirect the output to dev/null. Like this:

Process.detach fork { exec "ruby lib/server.rb >& /dev/null" }

When I pushed this, all my Travis workers crashed. Apparently, that command fails under Ubuntu (the reason for that is explained "here":http://blog.stefan-weigand.de/2008/09/23/syntax-error-bad-fd-number/), and Travis doesn't protect from that.

I fixed this specific situation by changing my code to:

Process.detach fork { exec "ruby lib/server.rb >/dev/null 2>&1" }

I might look into Travis to find a way to avoid crashing it again in the future. :) However, I'm not sure I will issue a pull request in the next few days, so here is an issue to avoid forgetting about it. ;)