Godot Version
v4.5.1.stable.official [f62fdbde1]
Question
When using OS.execute_with_pipe to execute a program with pipes, is it possible to only close the stdin pipe while leaving the stdout pipe open?
I have a program that reads from stdin until EOF, and then outputs to stdout after it is finished processing the data from stdin. Whenever I execute it with OS.execute_with_pipe and get the pipe FileAccess from the stdio key in the dictionary, I can try to read and write from it but:
- If I write all of my data to the pipe
FileAccessbut don’t callclose()on it, I will be blocked reading forever because the program I am executing only advances after getting EOF from stdin. - If I write all of my data to the pipe
FileAccessand callclose()on it, the program I am executing will advance since stdin is closed and giving EOF, but will crash when trying to write to stdout since that pipe closes too.
So is there a way to close only the stdin pipe, or at least somehow have the program I am executing receive EOF so it continues and writes to stdout?