-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS.is_process_running()
returns false for a process created with OS.create_instance()
#94974
Comments
Does it work correctly with
So either this documentation description is wrong (and something is broken) or the description is correct (and we might want to clarify this further) Also is this running from an app bundle? From a look at the macOS code it does its own handling for process creation in that case and doesn't seem to register running processes like normal in OSUnix |
Edit: Only in the base OS implementation. In the macOS one, it can redirect to |
Yes, this is With this substitution it works correctly, prints var pid := OS.create_process(OS.get_executable_path(), ["-e", "--path", absolute_path]) However, docs say that I wonder if it means that it's somehow not guaranteed to work in some cases. Git blame points to this commit by @AdamLearns: d7f4b07 |
OS.is_process_running()
returns false for a newly created godot instanceOS.is_process_running()
returns false for a process created with OS.create_instance()
CC @bruvzg |
Seems like Unix |
You can use |
I see. I would actually prefer to run it headlessly because I just want to parse some scripts in the child process and quit, so opening the editor window at all isn't ideal for what I'm trying to do. But unfortunately |
|
ooh good to know, will test it out later 👍 |
Tested versions
v4.3.rc1.official [e343dbb]
System information
Godot v4.3.rc1 - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)
Issue description
When creating a new godot process with
OS.create_instance()
and trying to monitor its lifecycle withOS.is_process_running()
the latter method always return false. I'm trying to find a way to wait for the child process to finish before executing more logic code, but sinceOS.is_process_running()
is always returningfalse
it seems impossibleThis is the code that the MRP is running:
And this is the output:
The child project itself runs fine. The editor window with the correct project opens with no problem
Steps to reproduce
false
4 timesMinimal reproduction project (MRP)
MRP_is_process_running.zip
The text was updated successfully, but these errors were encountered: