-rw-r--r-- | core/launcher/qprocess_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp index d62e4e6..56e1b1d 100644 --- a/core/launcher/qprocess_unix.cpp +++ b/core/launcher/qprocess_unix.cpp | |||
@@ -3,101 +3,101 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. | 21 | // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. |
22 | #if defined(connect) | 22 | #if defined(connect) |
23 | #undef connect | 23 | #undef connect |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #include "qprocess.h" | 26 | #include "qprocess.h" |
27 | 27 | ||
28 | /* OPIE */ | 28 | /* OPIE */ |
29 | #include <opie2/odebug.h> | 29 | #include <opie2/odebug.h> |
30 | using namespace Opie::Core; | 30 | using namespace Opie::Core; |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
33 | #ifndef QT_NO_PROCESS | 33 | #ifndef QT_NO_PROCESS |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | #include <qqueue.h> | 35 | #include <qqueue.h> |
36 | #include <qlist.h> | 36 | #include <qlist.h> |
37 | #include <qsocketnotifier.h> | 37 | #include <qsocketnotifier.h> |
38 | #include <qtimer.h> | 38 | #include <qtimer.h> |
39 | #include <qregexp.h> | 39 | #include <qregexp.h> |
40 | 40 | ||
41 | #include "qcleanuphandler_p.h" | 41 | #include "qcleanuphandler_p.h" |
42 | 42 | ||
43 | /* STD */ | 43 | /* STD */ |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | #include <unistd.h> | 45 | #include <unistd.h> |
46 | #include <signal.h> | 46 | #include <signal.h> |
47 | #include <sys/socket.h> | 47 | #include <sys/socket.h> |
48 | #include <sys/ioctl.h> | 48 | #include <sys/ioctl.h> |
49 | #include <sys/wait.h> | 49 | #include <sys/wait.h> |
50 | #include <sys/fcntl.h> | 50 | #include <sys/fcntl.h> |
51 | #include <sys/resource.h> | ||
52 | #include <errno.h> | 51 | #include <errno.h> |
53 | #ifdef Q_OS_MACX | 52 | #ifdef Q_OS_MACX |
54 | #include <sys/time.h> | 53 | #include <sys/time.h> |
55 | #endif | 54 | #endif |
55 | #include <sys/resource.h> | ||
56 | 56 | ||
57 | #ifdef __MIPSEL__ | 57 | #ifdef __MIPSEL__ |
58 | # ifndef SOCK_DGRAM | 58 | # ifndef SOCK_DGRAM |
59 | # define SOCK_DGRAM 1 | 59 | # define SOCK_DGRAM 1 |
60 | # endif | 60 | # endif |
61 | # ifndef SOCK_STREAM | 61 | # ifndef SOCK_STREAM |
62 | # define SOCK_STREAM 2 | 62 | # define SOCK_STREAM 2 |
63 | # endif | 63 | # endif |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | //#define QT_QPROCESS_DEBUG | 66 | //#define QT_QPROCESS_DEBUG |
67 | 67 | ||
68 | 68 | ||
69 | #ifdef Q_C_CALLBACKS | 69 | #ifdef Q_C_CALLBACKS |
70 | extern "C" { | 70 | extern "C" { |
71 | #endif // Q_C_CALLBACKS | 71 | #endif // Q_C_CALLBACKS |
72 | 72 | ||
73 | #define QT_SIGNAL_RETTYPE void | 73 | #define QT_SIGNAL_RETTYPE void |
74 | #define QT_SIGNAL_ARGS int | 74 | #define QT_SIGNAL_ARGS int |
75 | #define QT_SIGNAL_IGNORE SIG_IGN | 75 | #define QT_SIGNAL_IGNORE SIG_IGN |
76 | 76 | ||
77 | QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); | 77 | QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); |
78 | QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); | 78 | QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); |
79 | 79 | ||
80 | #ifdef Q_C_CALLBACKS | 80 | #ifdef Q_C_CALLBACKS |
81 | } | 81 | } |
82 | #endif // Q_C_CALLBACKS | 82 | #endif // Q_C_CALLBACKS |
83 | 83 | ||
84 | 84 | ||
85 | class QProc; | 85 | class QProc; |
86 | class QProcessManager; | 86 | class QProcessManager; |
87 | class QProcessPrivate | 87 | class QProcessPrivate |
88 | { | 88 | { |
89 | public: | 89 | public: |
90 | QProcessPrivate(); | 90 | QProcessPrivate(); |
91 | ~QProcessPrivate(); | 91 | ~QProcessPrivate(); |
92 | 92 | ||
93 | void closeOpenSocketsForChild(); | 93 | void closeOpenSocketsForChild(); |
94 | void newProc( pid_t pid, QProcess *process ); | 94 | void newProc( pid_t pid, QProcess *process ); |
95 | 95 | ||
96 | QByteArray bufStdout; | 96 | QByteArray bufStdout; |
97 | QByteArray bufStderr; | 97 | QByteArray bufStderr; |
98 | 98 | ||
99 | QQueue<QByteArray> stdinBuf; | 99 | QQueue<QByteArray> stdinBuf; |
100 | 100 | ||
101 | QSocketNotifier *notifierStdin; | 101 | QSocketNotifier *notifierStdin; |
102 | QSocketNotifier *notifierStdout; | 102 | QSocketNotifier *notifierStdout; |
103 | QSocketNotifier *notifierStderr; | 103 | QSocketNotifier *notifierStderr; |