Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Global limit_handles

boost::process::limit_handles

Synopsis

// In header: <boost/process/handles.hpp>

static unspecified limit_handles;

Description

The limit_handles property sets all properties to be inherited only expcitly. It closes all unused file-descriptors on posix after the fork and removes the inherit flags on windows.

[Note] Note

This is executed after the fork on posix.

system("gcc", limit_handles);

Since limit also closes the standard handles unless they are explicitly redirected they can be ignored by limit_handles in the following way.

system("gcc", limit_handles.allowStd())


PrevUpHomeNext