mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-22 23:17:26 -04:00
fix is sandbox running on macos
This commit is contained in:
parent
db671ac9bf
commit
49a2a82c2b
1 changed files with 8 additions and 6 deletions
|
@ -140,15 +140,17 @@ func is_sandbox_running() -> bool:
|
||||||
|
|
||||||
Platform.LINUX_BSD:
|
Platform.LINUX_BSD:
|
||||||
var output = []
|
var output = []
|
||||||
OS.execute("ps", ["-o", "pid=", "-p", snbx_pid], output)
|
OS.execute("ps", ["-o", "stat=", "-p", snbx_pid], output)
|
||||||
Debug.logclr("ps: " + str(output), Color.DIM_GRAY)
|
var stat = output[0].replace("\n", "").split(" ")[0]
|
||||||
return not output[0].is_empty()
|
Debug.logclr("ps: " + stat + " " + str(snbx_pid), Color.DIM_GRAY)
|
||||||
|
return not stat.is_empty() and not stat in ["Z", "T"]
|
||||||
|
|
||||||
Platform.MACOS:
|
Platform.MACOS:
|
||||||
var output = []
|
var output = []
|
||||||
OS.execute("ps", ["-o", "pid=", "-p", snbx_pid], output)
|
OS.execute("ps", ["-o", "stat=", "-p", snbx_pid], output)
|
||||||
Debug.logclr("ps: " + str(output), Color.DIM_GRAY)
|
var stat = output[0].replace("\n", "").split(" ")[0]
|
||||||
return not output[0].is_empty()
|
Debug.logclr("ps: " + stat + " " + str(snbx_pid), Color.DIM_GRAY)
|
||||||
|
return not stat.is_empty() and not stat in ["Z", "T"]
|
||||||
|
|
||||||
_:
|
_:
|
||||||
assert(false, "Platform is not supported")
|
assert(false, "Platform is not supported")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue