• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kprocctrl.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at)
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __KPROCCTRL_H__
21 #define __KPROCCTRL_H__
22 
23 #include <tqvaluelist.h>
24 
25 #include "kprocess.h"
26 
27 class TQSocketNotifier;
28 
39 class KDECORE_EXPORT KProcessController : public TQObject
40 {
41  Q_OBJECT
42 
43 public:
48  static void ref();
49 
54  static void deref();
55 
60  static KProcessController *theKProcessController; // kde4: rename: instance
61 
69  static void theSigCHLDHandler(int signal); // KDE4: private
70 
81  bool waitForProcessExit(int timeout);
82 
88  void unscheduleCheck();
89 
95  void rescheduleCheck();
96 
97  /*
98  * Obtain the file descriptor KProcessController uses to get notified
99  * about process exits. select() or poll() on it if you create a custom
100  * event loop that needs to act upon SIGCHLD.
101  * @return the file descriptor of the reading end of the notification pipe
102  * @since 3.2
103  */
104  int notifierFd() const;
105 
109  void addKProcess( KProcess* );
113  void removeKProcess( KProcess* );
117  void addProcess( int pid );
118 
119 private slots:
120  void slotDoHousekeeping();
121 
122 private:
123  friend class I_just_love_gcc;
124 
125  int fd[2];
126  bool needcheck;
127  TQSocketNotifier *notifier;
128  TQValueList<KProcess*> kProcessList;
129  TQValueList<int> unixProcessList;
130 
131  static void setupHandlers();
132  static void resetHandlers();
133  static struct sigaction oldChildHandlerData;
134  static bool handlerSet;
135 
136  static int refCount;
137 
138  // Disallow instantiation
139  KProcessController();
140  ~KProcessController();
141 
142  // Disallow assignment and copy-construction
143  KProcessController( const KProcessController& );
144  KProcessController& operator= ( const KProcessController& );
145 };
146 
147 
148 
149 #endif
150 
KProcess
Child process invocation, monitoring and control.
Definition: kprocess.h:130
KProcessController::theKProcessController
static KProcessController * theKProcessController
Only a single instance of this class is allowed at a time, and this static variable is used to track ...
Definition: kprocctrl.h:60
KProcessController
Used internally by KProcess.
Definition: kprocctrl.h:39

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |