#include <tdeprocess.h>

Public Member Functions | |
KShellProcess (const char *shellname=0) | |
~KShellProcess () | |
virtual bool | start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication) |
![]() | |
TDEProcess (TQObject *parent, const char *name=0) | |
TDEProcess () | |
virtual | ~TDEProcess () |
bool | setExecutable (const TQString &proc) TDE_DEPRECATED |
TDEProcess & | operator<< (const TQString &arg) |
TDEProcess & | operator<< (const char *arg) |
TDEProcess & | operator<< (const TQCString &arg) |
TDEProcess & | operator<< (const TQStringList &args) |
void | clearArguments () |
virtual bool | kill (int signo=SIGTERM) |
bool | isRunning () const |
pid_t | pid () const |
TDE_DEPRECATED pid_t | getPid () const |
void | suspend () |
void | resume () |
bool | wait (int timeout=-1) |
bool | normalExit () const |
bool | signalled () const |
bool | coreDumped () const |
int | exitStatus () const |
int | exitSignal () const |
bool | writeStdin (const char *buffer, int buflen) |
bool | closeStdin () |
bool | closeStdout () |
bool | closeStderr () |
bool | closePty () |
void | closeAll () |
const TQValueList< TQCString > & | args () |
void | setRunPrivileged (bool keepPrivileges) |
bool | runPrivileged () const |
void | setEnvironment (const TQString &name, const TQString &value) |
void | setWorkingDirectory (const TQString &dir) |
void | setUseShell (bool useShell, const char *shell=0) |
void | detach () |
void | setUsePty (Communication comm, bool addUtmp) |
KPty * | pty () const |
bool | setPriority (int prio) |
Static Public Member Functions | |
static TQString | quote (const TQString &arg) |
![]() | |
static TQString | quote (const TQString &arg) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
![]() | |
void | setupEnvironment () |
virtual int | setupCommunication (Communication comm) |
virtual int | commSetupDoneP () |
virtual int | commSetupDoneC () |
virtual void | processHasExited (int state) |
virtual void | commClose () |
void | setBinaryExecutable (const char *filename) |
int | childOutput (int fdno) |
int | childError (int fdno) |
Additional Inherited Members | |
![]() | |
enum | Communication { NoCommunication = 0 , Stdin = 1 , Stdout = 2 , Stderr = 4 , AllOutput = 6 , All = 7 , NoRead = 8 , CTtyOnly = NoRead , MergedStderr = 16 } |
enum | RunMode { DontCare , NotifyOnExit , Block , OwnGroup } |
enum | { PrioLowest = 20 , PrioLow = 10 , PrioLower = 5 , PrioNormal = 0 , PrioHigher = -5 , PrioHigh = -10 , PrioHighest = -19 } |
![]() | |
void | processExited (TDEProcess *proc) |
void | receivedStdout (TDEProcess *proc, char *buffer, int buflen) |
void | receivedStdout (int fd, int &len) |
void | receivedStderr (TDEProcess *proc, char *buffer, int buflen) |
void | wroteStdin (TDEProcess *proc) |
![]() | |
void | slotChildOutput (int fdno) |
void | slotChildError (int fdno) |
void | slotSendData (int dummy) |
![]() | |
TQValueList< TQCString > | arguments |
RunMode | run_mode |
bool | runs |
pid_t | pid_ |
int | status |
bool | keepPrivs |
int | out [2] |
int | in [2] |
int | err [2] |
TQSocketNotifier * | innot |
TQSocketNotifier * | outnot |
TQSocketNotifier * | errnot |
Communication | communication |
const char * | input_data |
int | input_sent |
int | input_total |
Detailed Description
A class derived from TDEProcess to start child processes through a shell.
Use TDEProcess and TDEProcess::setUseShell(true) instead.
Definition at line 904 of file tdeprocess.h.
Constructor & Destructor Documentation
◆ KShellProcess()
KShellProcess::KShellProcess | ( | const char * | shellname = 0 | ) |
Constructor.
If no shellname is specified, the user's default shell is used.
Definition at line 1110 of file tdeprocess.cpp.
◆ ~KShellProcess()
KShellProcess::~KShellProcess | ( | ) |
Destructor.
Definition at line 1116 of file tdeprocess.cpp.
Member Function Documentation
◆ start()
|
virtual |
Starts the process.
For a detailed description of the various run modes and communication semantics, have a look at the general description of the TDEProcess class. Note that if you use setUsePty( Stdout | Stderr, <bool> ), you cannot use Stdout | Stderr here - instead, use Stdout only to receive the mixed output.
The following problems could cause this function to return false:
- The process is already running.
- The command line argument list is empty.
- The the
comm
parameter is incompatible with the selected pty usage. - The starting of the process failed (could not fork).
- The executable was not found.
- Parameters
-
runmode The Run-mode for the process. comm Specifies which communication links should be established to the child process (stdin/stdout/stderr). By default, no communication takes place and the respective communication signals will never get emitted.
- Returns
- true on success, false on error (see above for error conditions)
Reimplemented from TDEProcess.
Definition at line 1124 of file tdeprocess.cpp.
The documentation for this class was generated from the following files: