mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:13:22 +08:00
Merge pull request #799 from Supermathie/freebsd-ps
message_bus: support ps on FreeBSD
This commit is contained in:
commit
10a3374cf4
|
@ -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
Block a user