class RunCommandBase

Base virtual class for running an external command. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

ExecId (class)

ExecId

 RunCommandBase (EventLoop& eventloop, const string& command, const string& real_command_name, int task_priority = XorpTask::PRIORITY_DEFAULT)

RunCommandBase

Constructor for a given command.

Parameters:

eventloopthe event loop.
commandthe command to execute.
real_command_namethe real command name.
task_prioritythe priority to read stdout and stderr.
 ~RunCommandBase ()

~RunCommandBase

[virtual]

Destructor.

void  set_argument_list (const list<string>& v)

set_argument_list

Set the list with the arguments for the command to execute.

Parameters:

vthe list with the arguments for the command to execute.
int  execute ()

execute

Execute the command.

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  terminate ()

terminate

Terminate the command.

void  terminate_with_prejudice ()

terminate_with_prejudice

Terminate the command with prejudice.

const string&  command ()

command

[const]

Get the name of the command to execute.

Returns: a string with the name of the command to execute.

const list<string>&  argument_list ()

argument_list

[const]

Get the list with the arguments of the command to execute.

Returns: a string with the arguments of the command to execute.

void  wait_status_changed (int wait_status)

wait_status_changed

Receive a notification that the status of the process has changed.

Parameters:

wait_statusthe wait status.
bool  is_exited ()

is_exited

[const]

Test if the command has exited.

Returns: true if the command has exited, otherwise false.

bool  is_signal_terminated ()

is_signal_terminated

[const]

Test if the command has been terminated by a signal.

Returns: true if the command has been terminated by a signal, otherwise false.

bool  is_coredumped ()

is_coredumped

[const]

Test if the command has coredumped.

Returns: true if the command has coredumped, otherwise false.

bool  is_stopped ()

is_stopped

[const]

Test if the command has been stopped.

Returns: true if the command has been stopped, otherwise false.

int  exit_status ()

exit_status

[const]

Get the command exit status.

Returns: the command exit status.

int  term_signal ()

term_signal

[const]

Get the signal that terminated the command.

Returns: the signal that terminated the command.

int  stop_signal ()

stop_signal

[const]

Get the signal that stopped the command.

Returns: the signal that stopped the command.

int  task_priority ()

task_priority

[const]

Get the priority to use when reading output from the command.

Returns: the stdout and stderr priority.

ExecId&  exec_id ()

exec_id

Get a reference to the ExecId object.

Returns: a reference to the ExecId object that is used for setting the execution ID when running the command.

void  set_exec_id (const ExecId& v)

set_exec_id

Set the execution ID for executing the command.

Parameters:

vthe execution ID.

Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:10:36 2009, using kdoc 2.0a54+XORP.