sheredom / subprocess.h

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

Adding lifetime documentation #51

Closed Qix- closed 2 years ago

Qix- commented 2 years ago

Hey there, great little library. Thank you so much for releasing it!

There's something missing from the header's docs that would be immensely helpful for consumers: lifetime requirements of parameters.

For example, subprocess_create_ex's environment array parameter - does the memory pointed to by the pointer value need to out-live the subprocess's? Or can that memory be freed directly after the call returns?

Adding that sort of information would be really helpful. :)

sheredom commented 2 years ago

Good shout! I'll add something 😄

sheredom commented 2 years ago

Fixed! https://github.com/sheredom/subprocess.h/commit/96ad0e1dc35c43581b46b8aa4509b9ecd11fda8e

Qix- commented 2 years ago

Thank you :)