From 132ee8a8e2535588bc904632cd4c489078da6a0c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 1 May 2013 14:28:34 -0400 Subject: [PATCH] message_bus: support ps on FreeBSD --- vendor/gems/message_bus/lib/message_bus/diagnostics.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/gems/message_bus/lib/message_bus/diagnostics.rb b/vendor/gems/message_bus/lib/message_bus/diagnostics.rb index 871755afbd6..f4248dd5615 100644 --- a/vendor/gems/message_bus/lib/message_bus/diagnostics.rb +++ b/vendor/gems/message_bus/lib/message_bus/diagnostics.rb @@ -4,6 +4,8 @@ class MessageBus::Diagnostics system = `uname`.strip if system == "Darwin" `ps -o "comm=" -p #{Process.pid}` + elsif system == "FreeBSD" + `ps -o command -p #{Process.pid}`.split("\n",2)[1].strip() else info = `ps -eo "%p|$|%a" | grep '^\\s*#{Process.pid}'` info.strip.split('|$|')[1]