Skip to content

Commit 892ee09

Browse files
committed
Bugfix: ps -o comm is more cross platform than ps -o command
1 parent 911de01 commit 892ee09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def hostname
447447
# Returns an array of string pids of all the other workers on this
448448
# machine. Useful when pruning dead workers on startup.
449449
def worker_pids
450-
`ps -A -o pid,command | grep [r]esque`.split("\n").map do |line|
450+
`ps -A -o pid,comm | grep [r]esque`.split("\n").map do |line|
451451
line.split(' ')[0]
452452
end
453453
end

0 commit comments

Comments
 (0)