#include <map>
#include <memory>
#include <string>
#include <vector>
#include <process/future.hpp>
#include <stout/flags.hpp>
#include <stout/lambda.hpp>
#include <stout/none.hpp>
#include <stout/option.hpp>
#include <stout/try.hpp>
#include <stout/os/exec.hpp>
#include <stout/os/shell.hpp>
#include <stout/os/int_fd.hpp>
Go to the source code of this file.
|
Try< Subprocess > | process::subprocess (const std::string &path, std::vector< std::string > argv, const Subprocess::IO &in=Subprocess::FD(STDIN_FILENO), const Subprocess::IO &out=Subprocess::FD(STDOUT_FILENO), const Subprocess::IO &err=Subprocess::FD(STDERR_FILENO), const flags::FlagsBase *flags=nullptr, const Option< std::map< std::string, std::string >> &environment=None(), const Option< lambda::function< pid_t(const lambda::function< int()> &)>> &clone=None(), const std::vector< Subprocess::ParentHook > &parent_hooks={}, const std::vector< Subprocess::ChildHook > &child_hooks={}, const std::vector< int_fd > &whitelist_fds={}) |
| Forks a subprocess and execs the specified 'path' with the specified 'argv', redirecting stdin, stdout, and stderr as specified by 'in', 'out', and 'err' respectively. More...
|
|
Try< Subprocess > | process::subprocess (const std::string &command, const Subprocess::IO &in=Subprocess::FD(STDIN_FILENO), const Subprocess::IO &out=Subprocess::FD(STDOUT_FILENO), const Subprocess::IO &err=Subprocess::FD(STDERR_FILENO), const Option< std::map< std::string, std::string >> &environment=None(), const Option< lambda::function< pid_t(const lambda::function< int()> &)>> &clone=None(), const std::vector< Subprocess::ParentHook > &parent_hooks={}, const std::vector< Subprocess::ChildHook > &child_hooks={}, const std::vector< int_fd > &whitelist_fds={}) |
| Overload of 'subprocess' for launching a shell command, i.e., 'sh -c command'. More...
|
|