message_bus: support ps on FreeBSD
This commit is contained in:
parent
5f4dbd6ddc
commit
132ee8a8e2
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue