\section{KProcess\-Controller Class Reference}
\label{classKProcessController}\index{KProcessController@{KProcessController}}
Used internally by {\bf KProcess}{\rm (p.\,\pageref{classKProcess})}.  


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

Inheritance diagram for KProcess\-Controller:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classKProcessController__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KProcess\-Controller:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{classKProcessController__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
bool {\bf wait\-For\-Process\-Exit} (int timeout)
\item 
void {\bf unschedule\-Check} ()
\item 
void {\bf reschedule\-Check} ()
\item 
int {\bf notifier\-Fd} () const \label{classKProcessController_a3}

\item 
void {\bf add\-KProcess} ({\bf KProcess} $\ast$)\label{classKProcessController_a4}

\item 
void {\bf remove\-KProcess} ({\bf KProcess} $\ast$)\label{classKProcessController_a5}

\item 
void {\bf add\-Process} (int pid)\label{classKProcessController_a6}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf ref} ()
\item 
static void {\bf deref} ()
\item 
static void {\bf the\-Sig\-CHLDHandler} (int signal)
\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
static {\bf KProcess\-Controller} $\ast$ {\bf the\-KProcess\-Controller}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf I\_\-just\_\-love\_\-gcc}\label{classKProcessController_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Used internally by {\bf KProcess}{\rm (p.\,\pageref{classKProcess})}. 



Definition at line 39 of file kprocctrl.h.

\subsection{Member Function Documentation}
\index{KProcessController@{KProcess\-Controller}!ref@{ref}}
\index{ref@{ref}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProcess\-Controller::ref ()\hspace{0.3cm}{\tt  [static]}}\label{classKProcessController_e0}


Create an instance if none exists yet. 

Called by \begin{Desc}
\item[See also:]{\bf KApplication::KApplication()}{\rm (p.\,\pageref{classKApplication_a0})} \end{Desc}


Definition at line 39 of file kprocctrl.cpp.

References the\-KProcess\-Controller.

Referenced by KProcess::KProcess().\index{KProcessController@{KProcess\-Controller}!deref@{deref}}
\index{deref@{deref}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProcess\-Controller::deref ()\hspace{0.3cm}{\tt  [static]}}\label{classKProcessController_e1}


Destroy the instance if one exists and it is not referenced any more. 

Called by \begin{Desc}
\item[See also:]KApplication::$\sim$KApplication() \end{Desc}


Definition at line 48 of file kprocctrl.cpp.

References the\-KProcess\-Controller.

Referenced by KProcess::$\sim$KProcess().\index{KProcessController@{KProcess\-Controller}!theSigCHLDHandler@{theSigCHLDHandler}}
\index{theSigCHLDHandler@{theSigCHLDHandler}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProcess\-Controller::the\-Sig\-CHLDHandler (int {\em signal})\hspace{0.3cm}{\tt  [static]}}\label{classKProcessController_e2}


Automatically called upon SIGCHLD. 

Never call it directly. If your application (or some library it uses) redirects SIGCHLD, the new signal handler (and only it) should call the old handler returned by sigaction(). 

Definition at line 147 of file kprocctrl.cpp.

References fd, and the\-KProcess\-Controller.\index{KProcessController@{KProcess\-Controller}!waitForProcessExit@{waitForProcessExit}}
\index{waitForProcessExit@{waitForProcessExit}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProcess\-Controller::wait\-For\-Process\-Exit (int {\em timeout})}\label{classKProcessController_a0}


Wait for any process to exit and handle their exit without starting an event loop. 

This function may cause {\bf KProcess}{\rm (p.\,\pageref{classKProcess})} to emit any of its signals.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timeout}]the timeout in seconds. -1 means no timeout. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if a process exited, false if no process exited within {\tt timeout} seconds. \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 223 of file kprocctrl.cpp.\index{KProcessController@{KProcess\-Controller}!unscheduleCheck@{unscheduleCheck}}
\index{unscheduleCheck@{unscheduleCheck}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProcess\-Controller::unschedule\-Check ()}\label{classKProcessController_a1}


Call this function to defer processing of the data that became available on notifier\-Fd(). 

\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 170 of file kprocctrl.cpp.

Referenced by KProcess::start(), and KProcess::wait().\index{KProcessController@{KProcess\-Controller}!rescheduleCheck@{rescheduleCheck}}
\index{rescheduleCheck@{rescheduleCheck}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProcess\-Controller::reschedule\-Check ()}\label{classKProcessController_a2}


This function {\em must\/} be called at some point after calling {\bf unschedule\-Check()}{\rm (p.\,\pageref{classKProcessController_a1})}. 

\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 178 of file kprocctrl.cpp.

Referenced by KProcess::start(), and KProcess::wait().

\subsection{Member Data Documentation}
\index{KProcessController@{KProcess\-Controller}!theKProcessController@{theKProcessController}}
\index{theKProcessController@{theKProcessController}!KProcessController@{KProcess\-Controller}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KProcess\-Controller} $\ast$ {\bf KProcess\-Controller::the\-KProcess\-Controller}\hspace{0.3cm}{\tt  [static]}}\label{classKProcessController_s0}


Only a single instance of this class is allowed at a time, and this static variable is used to track the one instance. 



Definition at line 36 of file kprocctrl.cpp.

Referenced by deref(), ref(), and the\-Sig\-CHLDHandler().

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