#include <process.hh>
Collaboration diagram for atoms::Process:

Definition at line 26 of file process.hh.
Public Member Functions | |
| Process (pid_t pid) | |
| int | wait () |
| Waits for the process to exit. | |
Static Public Member Functions | |
| Process | create (const boost::function< int()> &) |
| Creates a new process. | |
| void | exec (char const *path, char const *const *args, char const *const *environment=NULL) |
| Execute a file with the given full path. | |
| void | execFollowingPath (char const *name, char const *const *args) |
| Execute the named program, following the PATH environment variable. | |
| Process | spawn (char const *path, char const *const *args, char const *const *environment=NULL) |
| Spawns a new process image with the given full pathname. | |
| Process | spawnFollowingPath (char const *name, char const *const *args) |
| Spawns a new process image, following the PATH environmental variable. | |
Static Private Member Functions | |
| Process | spawnCommon (const boost::function< int()> &f) |
| Common code between spawn and spawnFollowing executed on parent side. | |
| int | spawnChildHalf (const boost::shared_ptr< UNIXStream > &writer, const boost::function< int()> &f) |
| Common code between spawn and spawnFollowing executed on child side. | |
| void | throwExecError (int error) |
Private Attributes | |
| pid_t | pid |
Static Private Attributes | |
| DebugLogger | LOGGER |
|
|
Definition at line 28 of file process.hh. References pid. Referenced by create(). |
|
|
Creates a new process.
Definition at line 22 of file process.cc. References pid, and Process(). Referenced by spawnCommon(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Execute a file with the given full path.
The current process image will be replaced with a new one.
Definition at line 38 of file process.cc. References args, and throwExecError(). |
Here is the call graph for this function:

|
||||||||||||
|
Execute the named program, following the PATH environment variable.
Definition at line 45 of file process.cc. References args, and throwExecError(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Spawns a new process image with the given full pathname. This is like doing a create and exec, but the main process waits around to hear about success or failure of the exec.
For internal use only. Creates a pipe that will be closed on exec. Success is recognized by immediate closure of the pipe. On failure, the error number is passed through the pipe before closing. Definition at line 50 of file process.cc. References args, and spawnCommon(). |
Here is the call graph for this function:

|
||||||||||||
|
Common code between spawn and spawnFollowing executed on child side.
Definition at line 85 of file process.cc. |
|
|
Common code between spawn and spawnFollowing executed on parent side.
Definition at line 60 of file process.cc. References create(), atoms::UNIXStream::Pipe::reader, throwExecError(), wait(), and atoms::UNIXStream::Pipe::writer. Referenced by spawn(), and spawnFollowingPath(). |
Here is the call graph for this function:

|
||||||||||||
|
Spawns a new process image, following the PATH environmental variable.
Definition at line 56 of file process.cc. References args, and spawnCommon(). |
Here is the call graph for this function:

|
|
Definition at line 106 of file process.cc. References atoms::DebugLogger::log(), and LOGGER. Referenced by exec(), execFollowingPath(), and spawnCommon(). |
Here is the call graph for this function:

|
|
Waits for the process to exit.
Definition at line 113 of file process.cc. References pid. Referenced by spawnCommon(). |
|
|
Referenced by throwExecError(). |
|
|
Definition at line 98 of file process.hh. |
1.3.5