class Command
|
Command is a class for running a command in another process. More... |
|
|
Public Methods
Detailed Description
Command is a class for running a command in another process.
Command (const String& command)
|
Call these before running the command to affect behavior.
void addArg (const String& arg)
|
void setArgs (const char* const* argList)
|
Set the args to be passed to execv(). Command does not make a
copy of these arguments; they must not be freed until after
Command::run() has been called.
Set LANG=C for command to be run; useful for commands whose
output is to be parsed, rather than displayed to the user.
Use a pseudo-terminal instead of a pipe for output & error.
void setDir (const String& dir)
|
Set the directory in which the command should be run.
Run the command. You can only run a command once. Returns 0
if successful, -1 if error.
These are only useful if the corresponding "set" methods have
*not* been called. The can only be called after run();
void kill (int sig = SIGTERM)
|
Wait and get status.
Copy commands error to "fd". Will not work if setError() was
called.
Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36. |