Unix pipes in c++