\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=70pt]{classKProcessController__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KProcess\-Controller:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=244pt]{classKProcessController__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Do\-Housekeeping} (int socket)\label{classKProcessController_i0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf add\-KProcess} ({\bf KProcess} $\ast$)\label{classKProcessController_a2}

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

\item 
bool {\bf wait\-For\-Process\-Exit} (int timeout)
\begin{CompactList}\small\item\em Wait for any process to exit and handle their exit without starting an event loop. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf the\-Sig\-CHLDHandler} (int signal)
\begin{CompactList}\small\item\em Automatically called upon SIGCHLD. \item\end{CompactList}\item 
void {\bf setup\-Handlers} ()\label{classKProcessController_e1}

\item 
void {\bf reset\-Handlers} ()\label{classKProcessController_e2}

\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
{\bf KProcess\-Controller} $\ast$ {\bf the\-KProcess\-Controller} = 0
\begin{CompactList}\small\item\em Only a single instance of this class is allowed at a time, and this static variable is used to track the one instance. \item\end{CompactList}\end{CompactItemize}


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



Definition at line 50 of file kprocctrl.h.

\subsection{Member Function Documentation}
\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_e0}


Automatically called upon SIGCHLD. 

Normally you do not need to do anything with this function but if your application needs to disable SIGCHLD for some time for reasons beyond your control, you should call this function afterwards to make sure that no SIGCHLDs where missed. 

Definition at line 146 of file kprocctrl.cpp.

References QValue\-List$<$ KProcess $\ast$ $>$::begin(), QValue\-List$<$ KProcess $\ast$ $>$::end(), fd, process\-List, 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_a4}


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 \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 276 of file kprocctrl.cpp.

References QTimer::is\-Active(), and QTimer::stop().

\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} = 0\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 46 of file kprocctrl.cpp.

Referenced by KProcess::detach(), KProcess::KProcess(), KProcess::start(), the\-Sig\-CHLDHandler(), and KProcess::$\sim$KProcess().

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