Found an issue and fixed it. Turns out destroying my #Process instance when the child exited was wrong, there could still be unread data in the #pipe. But then, only waiting for #EOF on the pipe was equally wrong ...
Now the code does the only reliable thing:
* When the child terminated, close the pipe for stdin immediately if one was present
* Only destroy the process instance once the child terminated AND the pipes for #stdout and #stderr (IF they were present) found EOF.
Committed now:
https://github.com/Zirias/poser/commit/18051d9da0ba7e4caf2882828e5706e35d419f94
And here are the docs:
https://zirias.github.io/poser/api/latest/class_p_s_c___process.html
My testing code also had to change a bit and now makes for a completely pointless and cute wrapper around /bin/ls