User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Exec - ChildOSProcessBodyC
 

  PUBLIC
ChildOSProcessBodyC::ChildOSProcessBodyC(void)
ChildOSProcessBodyC::ChildOSProcessBodyC(StringC,bool,bool,bool)
ChildOSProcessBodyC::ChildOSProcessBodyC(StringC,FilenameC,bool,bool)
ChildOSProcessBodyC::ChildOSProcessBodyC(StringListC)
ChildOSProcessBodyC::Run(StringListC,bool,bool,bool)
ChildOSProcessBodyC::Run(StringListC,FilenameC,bool,bool)
ChildOSProcessBodyC::StdOut(void)
ChildOSProcessBodyC::StdErr(void)
ChildOSProcessBodyC::StdIn(void)
ChildOSProcessBodyC::GetPID(void) const
ChildOSProcessBodyC::IsRunning(void)
ChildOSProcessBodyC::ExitedOk(void)
ChildOSProcessBodyC::Wait(void)
ChildOSProcessBodyC::Wait(double)
ChildOSProcessBodyC::ExitCode(void) const
ChildOSProcessBodyC::Terminate(double)
ChildOSProcessBodyC::GotExitCode(int)
OSProcessBodyC::Signal(IntT)
OSProcessBodyC::Kill(bool)
OSProcessBodyC::SigStop(void)
OSProcessBodyC::SigContinue(void)
OSProcessBodyC::Pid(void) const
OSProcessBodyC::Owner(void)
OSProcessBodyC::Hash(void) const
OSProcessBodyC::MemorySize(void)
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   ChildOSProcessBodyC   
 
Child process body.
 
include "Ravl/OS/ChildOSProcess.hh"
Created:24/11/98 
User Level:Develop
Library:RavlOS
Example:exChild.cc
In Scope:RavlN

Comments:
This class forks off a child process.

Parent Classes: Variables:
Methods:
ChildOSProcessBodyC()
Default constructor.

ChildOSProcessBodyC(StringC args,bool useStdOut = false,bool useStdErr = false,bool useStdIn = false)
Start a child process.

ChildOSProcessBodyC(StringC args,FilenameC out,bool redirectStderr = false,bool useStdIn = false)
Start a child process.

ChildOSProcessBodyC(StringListC args)
Start a child process.
where the first arg is the name of the program to run.

bool Run(StringListC args,bool useStdOut = false,bool useStdErr = false,bool useStdIn = false)
Run child process.
where the first arg is the name of the program to run. Will return false if failed, or if child is already running. NB. If StdErr or StdOut are false, the output will go to StdErr or StdOut of this process.

bool Run(StringListC args,FilenameC out,bool redirectStderr = false,bool useStdIn = false)
Run, sending output to a file.

IStreamC & StdOut()
Get the stdout of the process.
Is invalid, if output is not directed back to this process.

IStreamC & StdErr()
Get the stderr of the process.
Is invalid, if output is not directed back to this process.

OStreamC & StdIn()
Send to the stdin of the process.
Is invalid, if output is not directed back to this process.

int GetPID() const
Get the process ID.

bool IsRunning()
Test if child is still running.

bool ExitedOk()
Test eixted ok flag.
only valid if child has actual exited cleanly as apposed to a seg fault or signal.

bool Wait()
Wait for program to exit.
This function will not return until the program has exited.

bool Wait(double maxTime)
Wait for program to exit.
maxTime in the maximum time in seconds, if it is negative it won't time out.

IntT ExitCode() const
Get exit code.
Return the exit code of the program, if the program failed to exit normal this is set to the signal number which ended the program. This variable is only valid if program has exited.

bool Terminate(double maxTime = 10)
Terminate a process politely.

bool GotExitCode(int code)
Call if you get the exit code from OSProcessC::WaitForChild()
Returns TRUE as ExitedOk().

#include "Ravl/OS/OSProcess.hh"
bool Signal(IntT signo)
Send a signal to the process.

bool Kill(bool hard = false)
Kill the child process.
If hard is FALSE, a SIGQUIT is sent.(This can be intercepted by the process) Otherwise a SIGKILL is sent.

bool SigStop()
Stop this process. (As Ctrl-z)

bool SigContinue()
Continue this process.
Restart the this process after a stop.

int Pid() const
Get process id.

UserInfoC Owner()
Find the owner of the process.

UIntT Hash() const
Hash on pid.

UIntT MemorySize()
Get the amount of memory this process is using.
Returns 0 if failed. 1 if special Will return ((UIntT) -1) if process size is bigger than 4Gb.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Charles Galambos, Created: 24/11/98, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002