Python's Popen reimplemented in C++