...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards
...one of the most highly regarded and expertly designed C++ library projects in the world.
boost::process::posix::fd
// In header: <boost/process/posix.hpp> unspecified fd;
This property lets you modify file-descriptors other than the standard ones (0,1,2).
It provides the functions bind, which implements dup2 and close.
bind
Close can also be called with a range of file-descriptors to be closed.