sheredom / subprocess.h

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

Add an asynchronous reading API. #24

Closed sheredom closed 4 years ago

sheredom commented 4 years ago

This commit adds an asynchronous reading API to let you get the stdout or stderr of a process while the process is still running.

You cannot use normal C FILE API operations for this - so instead I've had to add new subprocess_read_stdout and subprocess_read_stderr helper functions and a subprocess_option_enable_async option to subprocess_create to enable this functionality.