You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing OS.execute with the blocking flag as false the process stays in zombie mode.
Because the process is already 'dead' I cannot kill it, thus remove from the process list.
Steps to reproduce
run any command in OS.execute with the flag blocking as false. Example: var pid = OS.execute('pwd', [], false)
go to your terminal and look for your processes and grep by keyword 'defunct'. Example: ps cax | grep defunct
You will see a list of processes executed by godot. If you keep running the command the list keeps growing. When you exit the application/game the processes are removed.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
I ran into the same issue today. I start extracting an archive using tar, then sit in a loop checking if this process is still running (using ps, this time in blocking mode) before doing something with the extracted files. Well, with this issue the process never terminates, so that doesn't work. I'll try working around it using threads or maybe multiple nodes and signals, and post the results.
UPD. From my test project:
func _is_process_running(pid: int) -> bool:
var exit_code = OS.execute("ps", ["-p", pid])
return !exit_code
func _on_Button3_pressed() -> void:
var fname = "REDACTED.tar.gz"
var workdir = OS.get_executable_path().get_base_dir() + "/"
var args = ["xzf", workdir + fname, "-C", workdir]
var pid = OS.execute("tar", args, false)
while _is_process_running(pid):
yield(get_tree().create_timer(0.1), "timeout")
print("Finished extracting ", fname)
Godot version
3.3.2
System information
Ubuntu 20.04.2 LTS, 64-bit
Issue description
When executing
OS.execute
with theblocking
flag as false the process stays in zombie mode.Because the process is already 'dead' I cannot kill it, thus remove from the process list.
Steps to reproduce
OS.execute
with the flagblocking
as false. Example:var pid = OS.execute('pwd', [], false)
ps cax | grep defunct
You will see a list of processes executed by godot. If you keep running the command the list keeps growing. When you exit the application/game the processes are removed.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: