This class wraps the handle of a pipe. It closes the pipe when it is destroyed. This class is useful in conjunction with GApp::systemExecute for reading from, or writing to, the standard i/o streams of a child process.
|
| | GPipe () |
| | Construct an empty pipe holder. More...
|
| |
| | ~GPipe () |
| |
| HANDLE | get () |
| | Returns the current handle. More...
|
| |
| ssize_t | read (char *buf, size_t bufSize) |
| | Read from the pipe until there is nothing else to read, or the buffer is full. More...
|
| |
| std::string | read (size_t maxSize=(size_t)-1) |
| | Read from the pipe until there is nothing else to read. More...
|
| |
| void | set (HANDLE h) |
| | Set the handle of the pipe. More...
|
| |
| void | toFile (const char *szFilename) |
| | Reads from the pipe and writes to the specified file, until there is nothing left to read. More...
|
| |
| void | write (const char *buf, size_t bufSize) |
| | Write to the pipe. More...
|
| |