#include <kprocess.h>
Inheritance diagram for KShellProcess:
Public Methods | |
KShellProcess (const char *shellname=0) | |
~KShellProcess () | |
virtual bool | start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication) |
Static Public Methods | |
QString | quote (const QString &arg) |
Protected Methods | |
virtual void | virtual_hook (int id, void *data) |
This class is similar to KProcess. The only difference is that KShellProcess runs the specified executable through a UN*X shell so that standard shell mechanisms like wild card matching, use of pipes and environment variable expansion will work.
For example, you could run commands like the following through KShellProcess:
ls ~/HOME/ *.lyx | sort | uniq |wc -l
KShellProcess tries really hard to find a valid executable shell. Here is the algorithm used for finding an executable shell:
|
Constructor By specifying the name of a shell (like "/bin/bash") you can override the mechanism for finding a valid shell as described in the detailed description of this class. |
|
Destructor. |
|
This function can be used to quote an argument string such that the shell processes it properly. This is e. g. necessary for user-provided file names which may contain spaces or quotes. It also prevents expansion of wild cards and environment variables. |
|
Starts up the process. -- For a detailed description have a look at the "start" member function and the detailed description of KProcess . Reimplemented from KProcess. |