13 #ifndef __PROCESS_IO_HPP__
14 #define __PROCESS_IO_HPP__
129 const std::vector<lambda::function<
void(
const std::string&)>>& hooks = {});
134 #endif // __PROCESS_IO_HPP__
const short READ
A possible event while polling.
Definition: io.hpp:34
Try< Bytes > size(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)
Definition: stat.hpp:100
const size_t BUFFERED_READ_SIZE
Buffered read chunk size.
Definition: io.hpp:46
Future< short > poll(int_fd fd, short events)
Returns the events (a subset of the events specified) that can be performed on the specified file des...
Future< Nothing > redirect(int_fd from, Option< int_fd > to, size_t chunk=4096, const std::vector< lambda::function< void(const std::string &)>> &hooks={})
Redirect output from the 'from' file descriptor to the 'to' file descriptor (or /dev/null if 'to' is ...
Future< size_t > write(int_fd fd, const void *data, size_t size)
Performs a single non-blocking write by polling on the specified file descriptor until data can be be...
const short WRITE
A possible event while polling.
Definition: io.hpp:39
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
Future< size_t > read(int_fd fd, void *data, size_t size)
Performs a single non-blocking read by polling on the specified file descriptor until any data can be...
int int_fd
Definition: int_fd.hpp:35
Definition: future.hpp:57