# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KProcessController Class Reference

Used internally by KProcess. More...

`#include <kprocctrl.h>`

Inheritance diagram for KProcessController:

[legend]
Collaboration diagram for KProcessController:

[legend]
List of all members.

## Public Slots

void | slotDoHousekeeping (int socket)

## Public Member Functions

void | addKProcess (KProcess *)
void | removeKProcess (KProcess *)
bool | waitForProcessExit (int timeout)
| Wait for any process to exit and handle their exit without starting an event loop.

## Static Public Member Functions

void | theSigCHLDHandler (int signal)
| Automatically called upon SIGCHLD.
void | setupHandlers ()
void | resetHandlers ()

## Static Public Attributes

KProcessController * | theKProcessController = 0
| Only a single instance of this class is allowed at a time, and this static variable is used to track the one instance.

## Detailed Description

Used internally by KProcess.

Definition at line 50 of file kprocctrl.h.

## Member Function Documentation

void KProcessController::theSigCHLDHandler | ( | int | signal | ) | `[static]`

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 QValueList< KProcess * >::begin(), QValueList< KProcess * >::end(), fd, processList, and theKProcessController.

bool KProcessController::waitForProcessExit | ( | int | timeout | ) |

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

This function may cause KProcess to emit any of its signals.

Parameters:

  timeout | the timeout in seconds

Returns:
  true if a process exited, false if no process exited within `timeout` seconds.

Since:
  3.1

Definition at line 276 of file kprocctrl.cpp.

References QTimer::isActive(), and QTimer::stop().

## Member Data Documentation

KProcessController * KProcessController::theKProcessController = 0`[static]`

| 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(), theSigCHLDHandler(), and KProcess::~KProcess().

The documentation for this class was generated from the following files:

- kprocctrl.h
- kprocctrl.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:50:42 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001