From 26311f6cd09bb390f878b23a233679b874411208 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 2 Nov 2005 22:05:45 +0000 Subject: Reaper knows how to find processes even if the dispatch path is very long. Closes #2711. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/process/reaper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/lib/commands') diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb index b99fd1efa2..0064642d6a 100644 --- a/railties/lib/commands/process/reaper.rb +++ b/railties/lib/commands/process/reaper.rb @@ -32,7 +32,7 @@ class ProgramProcess # 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 @@ class ProgramProcess 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 @@ ARGV.options do |opts| opts.parse! end -ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher]) \ No newline at end of file +ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher]) -- cgit v1.2.3