|
Hermes 0.7.0
Linux game streaming host
|
Capture a shell helper's output without an unbounded shutdown wait. More...
#include <array>#include <cerrno>#include <chrono>#include <csignal>#include <optional>#include <shared_mutex>#include <string>#include <thread>#include <fcntl.h>#include <poll.h>#include <sys/wait.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| std::shared_mutex & | platf::bounded_command::reap_mutex () |
| std::optional< std::string > | platf::bounded_command::output (const std::string &command, std::chrono::milliseconds timeout, bool *timed_out) |
Capture a shell helper's output without an unbounded shutdown wait.
Definition in file bounded_command.h.
|
inline |
Definition at line 33 of file bounded_command.h.
|
inline |
Held shared by every bounded command from before its fork until its child is reaped, and taken exclusively by proc_t::running() before it reaps stray children with waitpid(-1). Without it, that waitpid can take a command's exit status first: waitpid(child) then fails with ECHILD, and a complete reply is discarded as a failure.
Definition at line 28 of file bounded_command.h.