#include <Process.hpp>
◆ PTY()
◆ ~PTY()
◆ closeMasterChannel()
| void stc::Unix::PTY::closeMasterChannel |
( |
| ) |
|
|
inline |
◆ closeSlaveChannel()
| void stc::Unix::PTY::closeSlaveChannel |
( |
| ) |
|
|
inline |
◆ die()
| void stc::Unix::PTY::die |
( |
| ) |
|
|
inline |
Can be used to close the PTY. This should usually not be done unless you have an explicit reason to force-terminate it. This is primarily intended to be called internally by the child process, as destructors are not invoked with exec.
- See also
- https://stackoverflow.com/a/17135211
◆ readData()
| ssize_t stc::Unix::PTY::readData |
( |
std::stringstream & |
out | ) |
|
|
inline |
◆ writeToStdin()
| ssize_t stc::Unix::PTY::writeToStdin |
( |
const std::string & |
data | ) |
|
|
inline |
Note: this function only writes to the master channel, as it's assumed the result of fork() never returns control back to the code executed by stc. DO NOT USE THIS STRUCT IF YOU BREAK THIS ASSUMPTION! Shit will get weird. Reimplement it from scratch, or open a PR to make this API better.
◆ master
| int stc::Unix::PTY::master |
◆ slave
| int stc::Unix::PTY::slave |
The documentation for this struct was generated from the following file: