• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KProcessController Class Reference

Used internally by KProcess. More...

#include <kprocctrl.h>

Inheritance diagram for KProcessController:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void addKProcess (KProcess *)
void addProcess (int pid)
int notifierFd () const
void removeKProcess (KProcess *)
void rescheduleCheck ()
void unscheduleCheck ()
bool waitForProcessExit (int timeout)

Static Public Member Functions

static void deref ()
static void ref ()
static void theSigCHLDHandler (int signal)

Static Public Attributes

static KProcessController * theKProcessController

Detailed Description

Used internally by KProcess.

For internal use only.

Author:
Christian Czezatke <e9025461@student.tuwien.ac.at>
A class for internal use by KProcess only. -- Exactly one instance of this class is created by KApplication.

This class takes care of the actual (UN*X) signal handling.

Definition at line 39 of file kprocctrl.h.


Member Function Documentation

void KProcessController::addKProcess ( KProcess *  p  ) 

For internal use only.

Definition at line 261 of file kprocctrl.cpp.

void KProcessController::addProcess ( int  pid  ) 

For internal use only.

Definition at line 271 of file kprocctrl.cpp.

void KProcessController::deref (  )  [static]

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

Called by KApplication::~KApplication()

Definition at line 48 of file kprocctrl.cpp.

int KProcessController::notifierFd (  )  const

Definition at line 165 of file kprocctrl.cpp.

void KProcessController::ref (  )  [static]

Create an instance if none exists yet.

Called by KApplication::KApplication()

Definition at line 39 of file kprocctrl.cpp.

void KProcessController::removeKProcess ( KProcess *  p  ) 

For internal use only.

Definition at line 266 of file kprocctrl.cpp.

void KProcessController::rescheduleCheck (  ) 

This function must be called at some point after calling unscheduleCheck().

Since:
3.2

Definition at line 178 of file kprocctrl.cpp.

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

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().

For internal use only.

Definition at line 147 of file kprocctrl.cpp.

void KProcessController::unscheduleCheck (  ) 

Call this function to defer processing of the data that became available on notifierFd().

Since:
3.2

Definition at line 170 of file kprocctrl.cpp.

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. -1 means no timeout.
Returns:
true if a process exited, false if no process exited within timeout seconds.
Since:
3.1

Definition at line 223 of file kprocctrl.cpp.


Member Data Documentation

KProcessController * KProcessController::theKProcessController [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 60 of file kprocctrl.h.


The documentation for this class was generated from the following files:
  • kprocctrl.h
  • kprocctrl.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal