mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
messagebus diagnostics process path on Mac OS
This commit is contained in:
parent
fb573b917f
commit
bdeef4696f
1 changed files with 7 additions and 2 deletions
|
@ -1,8 +1,13 @@
|
||||||
class MessageBus::Diagnostics
|
class MessageBus::Diagnostics
|
||||||
def self.full_process_path
|
def self.full_process_path
|
||||||
begin
|
begin
|
||||||
info = `ps -eo "%p|$|%a" | grep '^\\s*#{Process.pid}'`
|
system = `uname`.strip
|
||||||
info.strip.split('|$|')[1]
|
if system == "Darwin"
|
||||||
|
`ps -o "comm=" -p #{Process.pid}`
|
||||||
|
else
|
||||||
|
info = `ps -eo "%p|$|%a" | grep '^\\s*#{Process.pid}'`
|
||||||
|
info.strip.split('|$|')[1]
|
||||||
|
end
|
||||||
rescue
|
rescue
|
||||||
# skip it ... not linux or something weird
|
# skip it ... not linux or something weird
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue