![]() |
boost::process::child — Generic implementation of the Child concept.
class child { public: // types typedef NativeSystemHandle handle_type; // Opaque name for the native process' handle type. // construct/copy/destruct child(handle_type, unspecified, unspecified, unspecified); // public member functions handle_type get_handle(void) const; postream & get_stdin(void) const; pistream & get_stdout(void) const; pistream & get_stderr(void) const; status wait(void) ; };
The child class implements the Child concept in an operating system agnostic way.
child
construct/copy/destructchild(handle_type h, unspecified fhstdin, unspecified fhstdout, unspecified fhstderr);
Creates a new child object that represents the just spawned process h.
The fhstdin, fhstdout and fhstderr file handles represent the parent's handles used to communicate with the corresponding data streams. They needn't be valid but their availability must match the redirections configured by the launcher that spawned this process.
This constructor is protected because the library user has no business in creating representations of live processes himself; the library takes care of that in all cases.
child
public member functionshandle_type get_handle(void ) const;
Returns the system handle that identifies the process.
postream & get_stdin(void ) const;
Returns a reference to a postream object that represents the standard input communication channel with the child process.
pistream & get_stdout(void ) const;
Returns a reference to a pistream object that represents the standard output communication channel with the child process.
pistream & get_stderr(void ) const;
Returns a reference to a pistream object that represents the standard error communication channel with the child process.
status wait(void ) ;
Returns a status object that represents the child process' finalization condition. The child process object ceases to be valid after this call.
Blocking remarks: This call blocks if the child process has not finalized execution and waits until it terminates.
Copyright © 2006 Julio M. Merino Vidal |