wibble  1.1
Protected Member Functions | List of all members
TestChild Class Reference

#include <childprocess.test.h>

Inheritance diagram for TestChild:
Inheritance graph
[legend]
Collaboration diagram for TestChild:
Collaboration graph
[legend]

Protected Member Functions

int main ()
 Main function to be called in the child process after it has forked. More...
 
- Protected Member Functions inherited from wibble::sys::ChildProcess
virtual void spawnChild ()
 On Windows, it's impossible to fork(), but if you were to fork+exec, it's not all lost. More...
 
void waitError ()
 
void setupPipes ()
 
void setupPrefork ()
 
void setupChild ()
 
void setupParent ()
 

Additional Inherited Members

- Public Member Functions inherited from wibble::sys::ChildProcess
 ChildProcess ()
 
virtual ~ChildProcess ()
 
void setExec (std::string command)
 Instead of calling the main() function of this class, execute an external command. More...
 
pid_t fork ()
 For a subprocess to run proc. More...
 
void setupRedirects (int *stdinfd=0, int *stdoutfd=0, int *stderrfd=0)
 
pid_t forkAndRedirect (int *stdinfd=0, int *stdoutfd=0, int *stderrfd=0)
 
pid_t pid () const
 Get the pid of the child process or (pid_t)-1 if no child is running. More...
 
bool running ()
 
int exitStatus ()
 
void waitForSuccess ()
 
int wait (struct rusage *ru=0)
 Wait for the child to finish, returning its exit status and optionally storing resource usage informations in ‘ru’. More...
 
void kill (int signal)
 Send the given signal to the process. More...
 
- Protected Attributes inherited from wibble::sys::ChildProcess
pid_t _pid
 
int pipes [3][2]
 
int * _stdin
 
int * _stdout
 
int * _stderr
 
int m_status
 
bool m_doExec
 
std::string m_command
 

Member Function Documentation

◆ main()

int TestChild::main ( )
inlineprotectedvirtual

Main function to be called in the child process after it has forked.

Implements wibble::sys::ChildProcess.


The documentation for this class was generated from the following file: