Method: Spring::Server#redirect_output

Defined in:
lib/spring/server.rb

#redirect_outputObject

We need to redirect STDOUT and STDERR, otherwise the server will keep the original FDs open which would break piping. (e.g. ‘spring rake -T | grep db` would hang forever because the server would keep the stdout FD open.)



138
139
140
# File 'lib/spring/server.rb', line 138

def redirect_output
  [STDOUT, STDERR].each { |stream| stream.reopen(env.log_file) }
end