sheredom / subprocess.h

🐜 single header process launching solution for C and C++
The Unlicense
1.1k stars 97 forks source link

subprocess_read_stdout() blocks #78

Closed SimonMaracine closed 6 months ago

SimonMaracine commented 6 months ago

Hello. As you pointed out in the documentation, the subprocess_read_stdout() function is blocking when there is no data available to read. I need to be able to read and write to a subprocess before joining it, but my problem is that I need the read operation to be asynchronous. Is there an easy solution for changing this behavior?

sheredom commented 6 months ago

Did you enable subprocess_option_enable_async?

SimonMaracine commented 6 months ago

Yes, of course. Sorry, I opened this issue before I saw legerch's pull request. I only checked the Issues section before opening this one.

sheredom commented 6 months ago

No bother!

sheredom commented 6 months ago

Trying to fix this in https://github.com/sheredom/subprocess.h/pull/80.