\section{KShell\-Process Class Reference}
\label{classKShellProcess}\index{KShellProcess@{KShellProcess}}
A class derived from {\bf KProcess}{\rm (p.\,\pageref{classKProcess})} to start child processes through a shell.  


{\tt \#include $<$kprocess.h$>$}

Inheritance diagram for KShell\-Process:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKShellProcess__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KShell\-Process:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=166pt]{classKShellProcess__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KShell\-Process} (const char $\ast$shellname=0)
\item 
{\bf $\sim$KShell\-Process} ()
\item 
virtual bool {\bf start} ({\bf Run\-Mode} runmode=Notify\-On\-Exit, {\bf Communication} comm=No\-Communication)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf QString} {\bf quote} (const {\bf QString} \&arg)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKShellProcess_b0}

\end{CompactItemize}


\subsection{Detailed Description}
A class derived from {\bf KProcess}{\rm (p.\,\pageref{classKProcess})} to start child processes through a shell. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
Use {\bf KProcess}{\rm (p.\,\pageref{classKProcess})} and KProcess::set\-Use\-Shell(true) instead.

\begin{Desc}
\item[Author:]Christian Czezatke $<${\tt e9025461@student.tuwien.ac.at}$>$ \end{Desc}




Definition at line 883 of file kprocess.h.

\subsection{Constructor \& Destructor Documentation}
\index{KShellProcess@{KShell\-Process}!KShellProcess@{KShellProcess}}
\index{KShellProcess@{KShellProcess}!KShellProcess@{KShell\-Process}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KShell\-Process::KShell\-Process (const char $\ast$ {\em shellname} = {\tt 0})}\label{classKShellProcess_a0}


Constructor. 

If no shellname is specified, the user's default shell is used. 

Definition at line 1110 of file kprocess.cpp.

References KProcess::set\-Use\-Shell().\index{KShellProcess@{KShell\-Process}!~KShellProcess@{$\sim$KShellProcess}}
\index{~KShellProcess@{$\sim$KShellProcess}!KShellProcess@{KShell\-Process}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KShell\-Process::$\sim${\bf KShell\-Process} ()}\label{classKShellProcess_a1}


Destructor. 



Definition at line 1116 of file kprocess.cpp.

\subsection{Member Function Documentation}
\index{KShellProcess@{KShell\-Process}!start@{start}}
\index{start@{start}!KShellProcess@{KShell\-Process}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShell\-Process::start ({\bf Run\-Mode} {\em runmode} = {\tt NotifyOnExit}, {\bf Communication} {\em comm} = {\tt NoCommunication})\hspace{0.3cm}{\tt  [virtual]}}\label{classKShellProcess_a2}


Starts the process. 

For a detailed description of the various run modes and communication semantics, have a look at the general description of the {\bf KProcess}{\rm (p.\,\pageref{classKProcess})} class. Note that if you use set\-Use\-Pty( 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:

\begin{itemize}
\item The process is already running. \item The command line argument list is empty. \item The the {\tt comm} parameter is incompatible with the selected pty usage. \item The starting of the process failed (could not fork). \item The executable was not found.\end{itemize}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em runmode}]The Run-mode for the process. \item[{\em 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.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false on error (see above for error conditions) \end{Desc}


Reimplemented from {\bf KProcess} {\rm (p.\,\pageref{classKProcess_a9})}.

Definition at line 1124 of file kprocess.cpp.

References KProcess::start().\index{KShellProcess@{KShell\-Process}!quote@{quote}}
\index{quote@{quote}!KShellProcess@{KShell\-Process}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KShell\-Process::quote (const {\bf QString} \& {\em arg})\hspace{0.3cm}{\tt  [static]}}\label{classKShellProcess_e0}


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. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em arg}]the argument to quote \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the quoted argument \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Reimplemented from {\bf KProcess} {\rm (p.\,\pageref{classKProcess_e0})}.

Definition at line 1119 of file kprocess.cpp.

References KProcess::quote().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kprocess.h\item 
kprocess.cpp\end{CompactItemize}
