summaryrefslogtreecommitdiff
path: root/core/launcher/qprocess_unix.cpp
authoreilers <eilers>2003-11-03 16:52:18 (UTC)
committer eilers <eilers>2003-11-03 16:52:18 (UTC)
commitd34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff)
treeb57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /core/launcher/qprocess_unix.cpp
parentce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff)
downloadopie-d34dc773591a2d467c68875a68a671d6a809f861.zip
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms should work. Please see $OPIEDIR/development/macosx for details
Diffstat (limited to 'core/launcher/qprocess_unix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qprocess_unix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index a07bf64..19a8c93 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -5,96 +5,99 @@
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//#include "qplatformdefs.h" 21//#include "qplatformdefs.h"
22 22
23// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. 23// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
24#if defined(connect) 24#if defined(connect)
25#undef connect 25#undef connect
26#endif 26#endif
27 27
28#include "qprocess.h" 28#include "qprocess.h"
29 29
30#ifndef QT_NO_PROCESS 30#ifndef QT_NO_PROCESS
31 31
32#include "qapplication.h" 32#include "qapplication.h"
33#include "qqueue.h" 33#include "qqueue.h"
34#include "qlist.h" 34#include "qlist.h"
35#include "qsocketnotifier.h" 35#include "qsocketnotifier.h"
36#include "qtimer.h" 36#include "qtimer.h"
37#include "qregexp.h" 37#include "qregexp.h"
38 38
39#include "qcleanuphandler_p.h" 39#include "qcleanuphandler_p.h"
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42 42
43// ### FOR Qt 2.3 compat 43// ### FOR Qt 2.3 compat
44#include <unistd.h> 44#include <unistd.h>
45#include <signal.h> 45#include <signal.h>
46#include <sys/socket.h> 46#include <sys/socket.h>
47#include <sys/ioctl.h> 47#include <sys/ioctl.h>
48#include <sys/wait.h> 48#include <sys/wait.h>
49#include <sys/fcntl.h> 49#include <sys/fcntl.h>
50 50
51#include <errno.h> 51#include <errno.h>
52 52
53#ifdef Q_OS_MACX
54#include <sys/time.h>
55#endif
53#include <sys/resource.h> 56#include <sys/resource.h>
54 57
55#ifdef __MIPSEL__ 58#ifdef __MIPSEL__
56# ifndef SOCK_DGRAM 59# ifndef SOCK_DGRAM
57# define SOCK_DGRAM 1 60# define SOCK_DGRAM 1
58# endif 61# endif
59# ifndef SOCK_STREAM 62# ifndef SOCK_STREAM
60# define SOCK_STREAM 2 63# define SOCK_STREAM 2
61# endif 64# endif
62#endif 65#endif
63 66
64//#define QT_QPROCESS_DEBUG 67//#define QT_QPROCESS_DEBUG
65 68
66 69
67#ifdef Q_C_CALLBACKS 70#ifdef Q_C_CALLBACKS
68extern "C" { 71extern "C" {
69#endif // Q_C_CALLBACKS 72#endif // Q_C_CALLBACKS
70 73
71#define QT_SIGNAL_RETTYPE void 74#define QT_SIGNAL_RETTYPE void
72#define QT_SIGNAL_ARGS int 75#define QT_SIGNAL_ARGS int
73#define QT_SIGNAL_IGNORE SIG_IGN 76#define QT_SIGNAL_IGNORE SIG_IGN
74 77
75 QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); 78 QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS);
76 QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); 79 QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS);
77 80
78#ifdef Q_C_CALLBACKS 81#ifdef Q_C_CALLBACKS
79} 82}
80#endif // Q_C_CALLBACKS 83#endif // Q_C_CALLBACKS
81 84
82 85
83class QProc; 86class QProc;
84class QProcessManager; 87class QProcessManager;
85class QProcessPrivate 88class QProcessPrivate
86{ 89{
87public: 90public:
88 QProcessPrivate(); 91 QProcessPrivate();
89 ~QProcessPrivate(); 92 ~QProcessPrivate();
90 93
91 void closeOpenSocketsForChild(); 94 void closeOpenSocketsForChild();
92 void newProc( pid_t pid, QProcess *process ); 95 void newProc( pid_t pid, QProcess *process );
93 96
94 QByteArray bufStdout; 97 QByteArray bufStdout;
95 QByteArray bufStderr; 98 QByteArray bufStderr;
96 99
97 QQueue<QByteArray> stdinBuf; 100 QQueue<QByteArray> stdinBuf;
98 101
99 QSocketNotifier *notifierStdin; 102 QSocketNotifier *notifierStdin;
100 QSocketNotifier *notifierStdout; 103 QSocketNotifier *notifierStdout;