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

tdecore

kprocctrl.h
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at)
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __KPROCCTRL_H__
00021 #define __KPROCCTRL_H__
00022 
00023 #include <tqvaluelist.h>
00024 
00025 #include "kprocess.h"
00026 
00027 class TQSocketNotifier;
00028 
00039 class TDECORE_EXPORT TDEProcessController : public TQObject
00040 {
00041   Q_OBJECT
00042 
00043 public:
00048   static void ref();
00049 
00054   static void deref();
00055 
00060   static TDEProcessController *theTDEProcessController; // kde4: rename: instance
00061 
00069   static void theSigCHLDHandler(int signal); // KDE4: private
00070 
00081   bool waitForProcessExit(int timeout);
00082 
00088   void unscheduleCheck();
00089 
00095   void rescheduleCheck();
00096 
00097   /*
00098    * Obtain the file descriptor TDEProcessController uses to get notified
00099    * about process exits. select() or poll() on it if you create a custom
00100    * event loop that needs to act upon SIGCHLD.
00101    * @return the file descriptor of the reading end of the notification pipe
00102    * @since 3.2
00103    */
00104   int notifierFd() const;
00105 
00109   void addTDEProcess( TDEProcess* );
00113   void removeTDEProcess( TDEProcess* );
00117   void addProcess( int pid );
00118 
00119 private slots:
00120   void slotDoHousekeeping();
00121 
00122 private:
00123   friend class I_just_love_gcc;
00124 
00125   int fd[2];
00126   bool needcheck;
00127   TQSocketNotifier *notifier;
00128   TQValueList<TDEProcess*> kProcessList;
00129   TQValueList<int> unixProcessList;
00130 
00131   static void setupHandlers();
00132   static void resetHandlers();
00133   static struct sigaction oldChildHandlerData;
00134   static bool handlerSet;
00135 
00136   static int refCount;
00137 
00138   // Disallow instantiation
00139   TDEProcessController();
00140   ~TDEProcessController();
00141 
00142   // Disallow assignment and copy-construction
00143   TDEProcessController( const TDEProcessController& );
00144   TDEProcessController& operator= ( const TDEProcessController& );
00145 };
00146 
00147 
00148 
00149 #endif
00150 

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.