skystrife / procxx

A simple process management library for C++ on UNIX platforms.
MIT License
144 stars 28 forks source link

Add ability to capture stderr #6

Closed ztdwu closed 8 years ago

ztdwu commented 8 years ago

Sorry, had to close PR #4 and move it here because that PR was accidentally created on my master branch which made it automatically update on new non-related commits.

Anyway, this PR adds the ability to capture a process's stderr pipe.. Since std::streambuf only has 1 read end and 1 write and, the stderr has to be backed by its own streambuf. Probably not be the best implementation, but it works.

skystrife commented 8 years ago

I like the change, but I don't necessarily agree with changing the function names for the other streams (breaking existing code). How about:

ztdwu commented 8 years ago

That sounds good. :)

ztdwu commented 8 years ago

I'm not very familiar with Github's PRs. Do I need to create a new PR for that? Or if you want to close this and add the changes yourself, I'm okay with that too.

skystrife commented 8 years ago

If you add another commit to your fork's stderr-capture branch, it should automatically end up in this PR.

ztdwu commented 8 years ago

Okay thanks, the naming change is updated.