Public Member Functions |
| | ShellCommand (const std::string &cmd) |
| virtual | ~Exec () |
| | Exec (const std::string &pathname) |
| | Create a new object that will execute program `program'.
|
| void | importEnv () |
| | Import the current environment into env.
|
| void | exec () |
| | exec the program, never returning if all goes well
|
| | ChildProcess () |
| virtual | ~ChildProcess () |
| pid_t | fork () |
| | For a subprocess to run proc.
|
| pid_t | forkAndRedirect (int *stdinfd=0, int *stdoutfd=0, int *stderrfd=0) |
| | Fork a subprocess to run proc.
|
| pid_t | pid () const |
| | Get the pid of the child process or (pid_t)-1 if no child is running.
|
| int | wait () |
| | Wait for the child to finish, returing its exit status.
|
| bool | running () |
| int | exitStatus () |
| void | waitForSuccess () |
| int | wait (struct rusage *ru) |
| | Wait for the child to finish, returing its exit status and storing resource usage informations in `ru'.
|
| void | kill (int signal) |
| | Send the given signal to the process.
|
Additional Inherited Members |
| std::string | pathname |
| | Filename or pathname of the program to execute.
|
| std::vector< std::string > | args |
| | Arguments for the process to execute.
|
| std::vector< std::string > | env |
| | Custom environment for the child process, if envFromParent is false.
|
| bool | envFromParent |
| | True if the environment is to be taken from the parent, false if it is explicitly provided in env.
|
| bool | searchInPath |
| | Set to true if the file is to be searched in the current $PATH.
|
| virtual int | main () |
| | Used to run the program as a child process, if one of the ChildProcess::fork functions is called.
|
| void | waitError () |
Execute a shell command using /bin/sh -c.