Diffstat (limited to 'libopie2/opiecore/oprocctrl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/oprocctrl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/oprocctrl.cpp b/libopie2/opiecore/oprocctrl.cpp index 0403526..46708ba 100644 --- a/libopie2/opiecore/oprocctrl.cpp +++ b/libopie2/opiecore/oprocctrl.cpp | |||
@@ -20,48 +20,50 @@ | |||
20 | // KPROCESSCONTROLLER -- A helper class for KProcess | 20 | // KPROCESSCONTROLLER -- A helper class for KProcess |
21 | // | 21 | // |
22 | // version 0.3.1, Jan, 8th 1997 | 22 | // version 0.3.1, Jan, 8th 1997 |
23 | // | 23 | // |
24 | // (C) Christian Czezatke | 24 | // (C) Christian Czezatke |
25 | // e9025461@student.tuwien.ac.at | 25 | // e9025461@student.tuwien.ac.at |
26 | // Ported by Holger Freyther | 26 | // Ported by Holger Freyther |
27 | // | 27 | // |
28 | 28 | ||
29 | //#include <config.h> | 29 | //#include <config.h> |
30 | 30 | ||
31 | #include <sys/types.h> | 31 | #include <sys/types.h> |
32 | #include <sys/socket.h> | 32 | #include <sys/socket.h> |
33 | 33 | ||
34 | #include <errno.h> | 34 | #include <errno.h> |
35 | #include <fcntl.h> | 35 | #include <fcntl.h> |
36 | #include <stdio.h> | 36 | #include <stdio.h> |
37 | #include <string.h> | 37 | #include <string.h> |
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <assert.h> | 39 | #include <assert.h> |
40 | 40 | ||
41 | #include <qsocketnotifier.h> | 41 | #include <qsocketnotifier.h> |
42 | #include "oprocctrl.h" | 42 | #include "oprocctrl.h" |
43 | 43 | ||
44 | using namespace Opie::Core::Private; | ||
45 | |||
44 | OProcessController *OProcessController::theOProcessController = 0; | 46 | OProcessController *OProcessController::theOProcessController = 0; |
45 | 47 | ||
46 | struct sigaction OProcessController::oldChildHandlerData; | 48 | struct sigaction OProcessController::oldChildHandlerData; |
47 | bool OProcessController::handlerSet = false; | 49 | bool OProcessController::handlerSet = false; |
48 | 50 | ||
49 | OProcessController::OProcessController() | 51 | OProcessController::OProcessController() |
50 | { | 52 | { |
51 | assert( theOProcessController == 0 ); | 53 | assert( theOProcessController == 0 ); |
52 | 54 | ||
53 | if (0 > pipe(fd)) | 55 | if (0 > pipe(fd)) |
54 | printf(strerror(errno)); | 56 | printf(strerror(errno)); |
55 | 57 | ||
56 | notifier = new QSocketNotifier(fd[0], QSocketNotifier::Read); | 58 | notifier = new QSocketNotifier(fd[0], QSocketNotifier::Read); |
57 | notifier->setEnabled(true); | 59 | notifier->setEnabled(true); |
58 | QObject::connect(notifier, SIGNAL(activated(int)), | 60 | QObject::connect(notifier, SIGNAL(activated(int)), |
59 | this, SLOT(slotDoHousekeeping(int))); | 61 | this, SLOT(slotDoHousekeeping(int))); |
60 | connect( &delayedChildrenCleanupTimer, SIGNAL( timeout()), | 62 | connect( &delayedChildrenCleanupTimer, SIGNAL( timeout()), |
61 | SLOT( delayedChildrenCleanup())); | 63 | SLOT( delayedChildrenCleanup())); |
62 | 64 | ||
63 | theOProcessController = this; | 65 | theOProcessController = this; |
64 | 66 | ||
65 | setupHandlers(); | 67 | setupHandlers(); |
66 | } | 68 | } |
67 | 69 | ||