kdecore Library API Documentation

KProcessController Class Reference

Used internally by KProcess. More...

#include <kprocctrl.h>

Inheritance diagram for KProcessController:

QObject List of all members.

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

KProcessControllertheKProcessController

Detailed Description

Used internally by KProcess.

Definition at line 39 of file kprocctrl.h.


Member Function Documentation

void KProcessController::ref  )  [static]
 

Create an instance if none exists yet.

Called by

See also:
KApplication::KApplication()

Definition at line 39 of file kprocctrl.cpp.

References theKProcessController.

Referenced by KProcess::KProcess().

void KProcessController::deref  )  [static]
 

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

Called by

See also:
KApplication::~KApplication()

Definition at line 46 of file kprocctrl.cpp.

References theKProcessController.

Referenced by KProcess::~KProcess().

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

Definition at line 138 of file kprocctrl.cpp.

References fd, theKProcessController, and theSigCHLDHandler().

Referenced by theSigCHLDHandler().

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

References waitForProcessExit().

Referenced by waitForProcessExit().

void KProcessController::unscheduleCheck  ) 
 

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

Since:
3.2

Definition at line 157 of file kprocctrl.cpp.

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

void KProcessController::rescheduleCheck  ) 
 

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

Since:
3.2

Definition at line 165 of file kprocctrl.cpp.

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


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

Referenced by deref(), ref(), and theSigCHLDHandler().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:14:09 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003