summaryrefslogtreecommitdiff
path: root/core/launcher/qprocess_unix.cpp
authormickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
committer mickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
commit4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (side-by-side diff)
tree59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/qprocess_unix.cpp
parent8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff)
downloadopie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2
use Opie debugging framework
Diffstat (limited to 'core/launcher/qprocess_unix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qprocess_unix.cpp93
1 files changed, 46 insertions, 47 deletions
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index 19a8c93..d62e4e6 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -20,4 +20,2 @@
-//#include "qplatformdefs.h"
-
// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
@@ -29,10 +27,14 @@
-#ifndef QT_NO_PROCESS
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
-#include "qapplication.h"
-#include "qqueue.h"
-#include "qlist.h"
-#include "qsocketnotifier.h"
-#include "qtimer.h"
-#include "qregexp.h"
+/* QT */
+#ifndef QT_NO_PROCESS
+#include <qapplication.h>
+#include <qqueue.h>
+#include <qlist.h>
+#include <qsocketnotifier.h>
+#include <qtimer.h>
+#include <qregexp.h>
@@ -40,5 +42,4 @@
+/* STD */
#include <stdlib.h>
-
-// ### FOR Qt 2.3 compat
#include <unistd.h>
@@ -49,5 +50,4 @@
#include <sys/fcntl.h>
-
+#include <sys/resource.h>
#include <errno.h>
-
#ifdef Q_OS_MACX
@@ -55,3 +55,2 @@
#endif
-#include <sys/resource.h>
@@ -134,3 +133,3 @@ public:
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
+ odebug << "QProc: Constructor for pid " << pid << " and QProcess " << process << "" << oendl;
#endif
@@ -143,3 +142,3 @@ public:
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
+ odebug << "QProc: Destructor for pid " << pid << " and QProcess " << process << "" << oendl;
#endif
@@ -215,3 +214,3 @@ QProcessManager::QProcessManager()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
+ odebug << "QProcessManager: install socket notifier (" << sigchldFd[1] << ")" << oendl;
#endif
@@ -228,3 +227,3 @@ QProcessManager::QProcessManager()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install a SIGCHLD handler" );
+ odebug << "QProcessManager: install a SIGCHLD handler" << oendl;
#endif
@@ -238,6 +237,6 @@ QProcessManager::QProcessManager()
if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
- qWarning( "Error installing SIGCHLD handler" );
+ owarn << "Error installing SIGCHLD handler" << oendl;
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
+ odebug << "QProcessManager: install a SIGPIPE handler (SIG_IGN)" << oendl;
#endif
@@ -254,3 +253,3 @@ QProcessManager::QProcessManager()
if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
- qWarning( "Error installing SIGPIPE handler" );
+ owarn << "Error installing SIGPIPE handler" << oendl;
}
@@ -268,12 +267,12 @@ QProcessManager::~QProcessManager()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: restore old sigchild handler" );
+ odebug << "QProcessManager: restore old sigchild handler" << oendl;
#endif
if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
- qWarning( "Error restoring SIGCHLD handler" );
+ owarn << "Error restoring SIGCHLD handler" << oendl;
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: restore old sigpipe handler" );
+ odebug << "QProcessManager: restore old sigpipe handler" << oendl;
#endif
if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
- qWarning( "Error restoring SIGPIPE handler" );
+ owarn << "Error restoring SIGPIPE handler" << oendl;
}
@@ -284,3 +283,3 @@ void QProcessManager::append( QProc *p )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
+ odebug << "QProcessManager: append process (procList.count(): " << procList->count() << ")" << oendl;
#endif
@@ -292,3 +291,3 @@ void QProcessManager::remove( QProc *p )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
+ odebug << "QProcessManager: remove process (procList.count(): " << procList->count() << ")" << oendl;
#endif
@@ -318,3 +317,3 @@ void QProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd()" );
+ odebug << "QProcessManager::sigchldHnd()" << oendl;
#endif
@@ -331,3 +330,3 @@ void QProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess available)" << oendl;
#endif
@@ -337,3 +336,3 @@ void QProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stdout" << oendl;
#endif
@@ -344,3 +343,3 @@ void QProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): reading " << nbytes << " bytes of pending data on stderr" << oendl;
#endif
@@ -358,3 +357,3 @@ void QProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
+ odebug << "QProcessManager::sigchldHnd() (PID: " << proc->pid << "): process exited (QProcess not available)" << oendl;
#endif
@@ -388,3 +387,3 @@ QProcessPrivate::QProcessPrivate()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessPrivate: Constructor" );
+ odebug << "QProcessPrivate: Constructor" << oendl;
#endif
@@ -405,3 +404,3 @@ QProcessPrivate::~QProcessPrivate()
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcessPrivate: Destructor" );
+ odebug << "QProcessPrivate: Destructor" << oendl;
#endif
@@ -601,3 +600,3 @@ bool QProcess::start( QStringList *env )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start()" );
+ odebug << "QProcess::start()" << oendl;
#endif
@@ -637,3 +636,3 @@ bool QProcess::start( QStringList *env )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
+ odebug << "QProcess::start(): arg " << i << " = " << arglist[i] << "" << oendl;
#endif
@@ -801,3 +800,3 @@ error:
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::start(): error starting process" );
+ odebug << "QProcess::start(): error starting process" << oendl;
#endif
@@ -880,3 +879,3 @@ bool QProcess::isRunning() const
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning(): FALSE (already computed)" );
+ odebug << "QProcess::isRunning(): FALSE (already computed)" << oendl;
#endif
@@ -897,3 +896,3 @@ bool QProcess::isRunning() const
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+ odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): FALSE" << oendl;
#endif
@@ -902,3 +901,3 @@ bool QProcess::isRunning() const
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+ odebug << "QProcess::isRunning() (PID: " << d->proc->pid << "): TRUE" << oendl;
#endif
@@ -922,3 +921,3 @@ void QProcess::writeToStdin( const QByteArray& buf )
#if defined(QT_QPROCESS_DEBUG)
-// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
+// odebug << "QProcess::writeToStdin(): write to stdin (" << d->socketStdin << ")" << oendl;
#endif
@@ -949,6 +948,6 @@ void QProcess::closeStdin()
if ( ::close( d->proc->socketStdin ) != 0 ) {
- qWarning( "Could not close stdin of child process" );
+ owarn << "Could not close stdin of child process" << oendl;
}
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
+ odebug << "QProcess::closeStdin(): stdin (" << d->proc->socketStdin << ") closed" << oendl;
#endif
@@ -972,3 +971,3 @@ void QProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): %d", fd );
+ odebug << "QProcess::socketRead(): " << fd << "" << oendl;
#endif
@@ -1001,3 +1000,3 @@ void QProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
+ odebug << "QProcess::socketRead(): stdout (" << fd << ") closed" << oendl;
#endif
@@ -1011,3 +1010,3 @@ void QProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
+ odebug << "QProcess::socketRead(): stderr (" << fd << ") closed" << oendl;
#endif
@@ -1063,3 +1062,3 @@ void QProcess::socketWrite( int fd )
#if defined(QT_QPROCESS_DEBUG)
- qDebug( "QProcess::socketWrite(): write to stdin (%d)", fd );
+ odebug << "QProcess::socketWrite(): write to stdin (" << fd << ")" << oendl;
#endif