diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 6 | ||||
-rw-r--r-- | railties/lib/commands/process/reaper.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/server.rb | 1 | ||||
-rw-r--r-- | railties/lib/commands/servers/lighttpd.rb | 9 |
4 files changed, 15 insertions, 3 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 24650fd674..d258852c0a 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,11 @@ *SVN* +* Added socket cleanup for lighttpd, both before and after [DHH] + +* Added automatic creation of tmp/ when running script/server [DHH] + +* Added silence_stream that'll work on both STDERR or STDOUT or any other stream and deprecated silence_stderr in the process [DHH] + * Added reload! method to script/console to reload all models and others that include Reloadable without quitting the console #4056 [esad@esse.at] * Added that rake rails:freeze:edge will now just export all the contents of the frameworks instead of just lib, so stuff like rails:update:scripts, rails:update:javascripts, and script/server on lighttpd still just works #4047 [DHH] diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb index 6da2191d1b..73b6b97f48 100644 --- a/railties/lib/commands/process/reaper.rb +++ b/railties/lib/commands/process/reaper.rb @@ -127,4 +127,4 @@ ARGV.options do |opts| opts.parse! end -ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher]) +ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher])
\ No newline at end of file diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 310afba689..85e3a64d60 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -25,4 +25,5 @@ else puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)" end +silence_stderr { `rake tmp:create` } require "commands/servers/#{server}"
\ No newline at end of file diff --git a/railties/lib/commands/servers/lighttpd.rb b/railties/lib/commands/servers/lighttpd.rb index 2bd9a1de14..315fb34ade 100644 --- a/railties/lib/commands/servers/lighttpd.rb +++ b/railties/lib/commands/servers/lighttpd.rb @@ -72,6 +72,7 @@ end trap(:INT) { exit } begin + `rake tmp:sockets:clear` # Needed if lighttpd crashes or otherwise leaves FCGI sockets around `lighttpd #{!detach ? "-D " : ""}-f #{config_file}` ensure unless detach @@ -79,7 +80,11 @@ ensure puts 'Exiting' # Ensure FCGI processes are reaped - ARGV.replace ['-a', 'kill'] - require 'commands/process/reaper' + silence_stream(STDOUT) do + ARGV.replace ['-a', 'kill'] + require 'commands/process/reaper' + end + + `rake tmp:sockets:clear` # Remove sockets on clean shutdown end end |