Better Processes 0.3.2 Tools 4.0 Community
Submitted by user GreenFox; MPL-2.0; 2023-05-31
OS.execute() lets you get the output, but it blocks the thread.
OS.create_process() kicks off a process in the background, but drops the output.
Better Processes lets you interactively create a background process.
It's built in Rust. Compiles to GDExtention. You won't have to worry about that.
Add a ProcessNode. Connect the stdout/stderr signals. Set the cmd,args, start_on_ready (or run "start" as needed) if you need it. If the process is still running when this node is deleted, it will close the child process.
Or create a Process object and call `start(cmd,args)`. You'll have to explicitly call `read_stdout()` and `read_stderr`. However the advantage is that when the last reference goes out of scope, it closes the child process.
Note: Due to GodotRust's current strictness, you must use the correct type args, no implicit typing. For example:
`myProcess.start("ping",["google.com"] as PackedStringArray)`
The `as PackedStringArray` is important here.
View files Download Submit an issue Recent Edits