fix callback error, remove logs, change getting stat

This commit is contained in:
Nordup 2025-03-19 05:00:12 +04:00
parent b113b92dff
commit f9883859b5
2 changed files with 3 additions and 4 deletions

View file

@ -141,14 +141,13 @@ func is_sandbox_running() -> bool:
Platform.LINUX_BSD:
# ps -o stat= -p 1234
OS.execute("ps", ["-o", "stat=", "-p", snbx_pid], output)
var stat = output[0].replace("\n", "").split(" ")[0]
Debug.logclr("ps: " + stat + " " + str(snbx_pid), Color.DIM_GRAY)
var stat = output[0].substr(0, 1)
return not stat.is_empty() and not stat in ["Z", "T"]
Platform.MACOS:
# ps -o stat= -p 1234
OS.execute("ps", ["-o", "stat=", "-p", snbx_pid], output)
var stat = output[0].replace("\n", "").split(" ")[0]
var stat = output[0].substr(0, 1)
return not stat.is_empty() and not stat in ["Z", "T"]
_:

View file

@ -55,7 +55,7 @@ func prompt_request(query: String) -> void:
func clear() -> void:
for callback in cancel_callbacks:
callback.call()
if callback.is_valid(): callback.call()
cancel_callbacks.clear()
for child in get_children():