sheredom / subprocess.h

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

Implement: bool subprocess_alive() #33

Closed IngwiePhoenix closed 3 years ago

IngwiePhoenix commented 3 years ago

When working with an async process, it'd be nice to have a clean method to periodically check if the process is still alive or if it has already finished. Right now, _join(), _destroy() and _terminate() seem to all be about waiting for a process to end - or just destroying the struct and sending it away from the current process (as stated that _destroy() can leave a process running even after main execution has finished).

sheredom commented 3 years ago

I'll add this to the todo. PRs welcome though!