diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 25a59b2734ece..b1218b3245583 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Reaper knows how to find processes even if the dispatch path is very long. #2711 [matthew@walker.wattle.id.au] + * Make fcgi handler respond to TERM signals with an explicit exit [Jamis Buck] * Added demonstration of fixture use to the test case generated by the model generator [DHH] diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb index b99fd1efa2313..0064642d6a5b9 100644 --- a/railties/lib/commands/process/reaper.rb +++ b/railties/lib/commands/process/reaper.rb @@ -32,7 +32,7 @@ def process_keywords(action, *keywords) # ProgramProcess.find_by_keyword("basecamp") def find_by_keyword(keyword) process_lines_with_keyword(keyword).split("\n").collect { |line| - next if line.include?("inq") || line.include?("ps -ax") || line.include?("grep") + next if line.include?("inq") || line.include?("ps -axww") || line.include?("grep") pid, *command = line.split new(pid, command.join(" ")) }.compact @@ -40,7 +40,7 @@ def find_by_keyword(keyword) private def process_lines_with_keyword(keyword) - `ps -ax -o 'pid command' | grep #{keyword}` + `ps -axww -o 'pid command' | grep #{keyword}` end end @@ -127,4 +127,4 @@ def to_s #:nodoc: opts.parse! end -ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher]) \ No newline at end of file +ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher])