13 #ifndef __STOUT_OS_POSIX_EXEC_HPP__ 14 #define __STOUT_OS_POSIX_EXEC_HPP__ 33 const std::string&
file,
34 const std::vector<std::string>& arguments)
40 }
else if (pid == 0) {
47 while (::
waitpid(pid, &status, 0) == -1) {
64 inline int execvpe(
const char*
file,
char** argv,
char** envp)
70 int result =
execvp(file, argv);
79 #endif // __STOUT_OS_POSIX_EXEC_HPP__
Result< ProcessStatus > status(pid_t pid)
Definition: proc.hpp:166
int execvp(const std::string &file, const std::vector< std::string > &argv)
Definition: exec.hpp:442
Definition: posix_signalhandler.hpp:23
char *** environmentp()
Definition: environment.hpp:88
int execvp(const char *file, char *const argv[])
Definition: exec.hpp:58
Represent the argument list expected by execv routines.
Definition: argv.hpp:36
DWORD pid_t
Definition: windows.hpp:181
URI file(const std::string &path)
Creates a file URI with the given path on the local host.
Definition: file.hpp:33
Result< pid_t > waitpid(pid_t pid, int *status, int options)
Definition: os.hpp:141
int execvpe(const char *file, char **argv, char **envp)
Definition: exec.hpp:64
Option< int > spawn(const std::string &file, const std::vector< std::string > &arguments)
Definition: exec.hpp:32
char ** environment()
Definition: environment.hpp:66