oprocctrl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __KPROCCTRL_H__
00030 #define __KPROCCTRL_H__
00031
00032 #include <qvaluelist.h>
00033 #include <qtimer.h>
00034
00035 #include "oprocess.h"
00036
00037 class OProcessControllerPrivate;
00038 class QSocketNotifier;
00039
00051 class OProcessController : public QObject
00052 {
00053 Q_OBJECT
00054
00055 public:
00056 OProcessController();
00057 ~OProcessController();
00058
00059
00060 public:
00061
00066 static OProcessController *theOProcessController;
00067
00076 static void theSigCHLDHandler(int signal);
00077
00078
00082 static void setupHandlers();
00086 static void resetHandlers();
00090 void addOProcess( OProcess* );
00094 void removeOProcess( OProcess* );
00095 public slots:
00099 void slotDoHousekeeping(int socket);
00100
00101 private slots:
00102 void delayedChildrenCleanup();
00103 private:
00104 int fd[2];
00105 QSocketNotifier *notifier;
00106 static struct sigaction oldChildHandlerData;
00107 static bool handlerSet;
00108 QValueList<OProcess*> processList;
00109 QTimer delayedChildrenCleanupTimer;
00110
00111
00112 OProcessController( const OProcessController& );
00113 OProcessController& operator= ( const OProcessController& );
00114
00115 OProcessControllerPrivate *d;
00116 };
00117
00118
00119
00120 #endif
00121
This file is part of the documentation for OPIE Version 1.1.