Permalink
Browse files

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
  • Loading branch information...
jeremy committed Nov 2, 2005
1 parent aabf909 commit 26311f6cd09bb390f878b23a233679b874411208
Showing with 5 additions and 3 deletions.
  1. +2 −0 railties/CHANGELOG
  2. +3 −3 railties/lib/commands/process/reaper.rb
View
@@ -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]
@@ -32,15 +32,15 @@ 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
end
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])
+ProgramProcess.process_keywords(OPTIONS[:action], OPTIONS[:dispatcher])

0 comments on commit 26311f6

Please sign in to comment.