summaryrefslogtreecommitdiffstats
path: root/src/kernel/qprocess_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qprocess_unix.cpp')
-rw-r--r--src/kernel/qprocess_unix.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/kernel/qprocess_unix.cpp b/src/kernel/qprocess_unix.cpp
index 21f3d98..40476d3 100644
--- a/src/kernel/qprocess_unix.cpp
+++ b/src/kernel/qprocess_unix.cpp
@@ -134,7 +134,7 @@ public:
QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc)
{
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
+ qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
#endif
socketStdin = 0;
socketStdout = 0;
@@ -143,7 +143,7 @@ public:
~QProc()
{
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
+ qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
#endif
if ( process ) {
if ( process->d->notifierStdin )
@@ -273,7 +273,7 @@ QProcessManager::QProcessManager() : sn(0)
sigchldFd[1] = 0;
} else {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
+ qDebug( "QProcessManager: install socket notifier (%d)", sigchldFd[1] );
#endif
sn = new QSocketNotifier( sigchldFd[1],
QSocketNotifier::Read, this );
@@ -286,7 +286,7 @@ QProcessManager::QProcessManager() : sn(0)
struct sigaction act;
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: install a SIGCHLD handler" );
+ qDebug( "QProcessManager: install a SIGCHLD handler" );
#endif
act.sa_handler = qt_C_sigchldHnd;
sigemptyset( &(act.sa_mask) );
@@ -296,17 +296,17 @@ QProcessManager::QProcessManager() : sn(0)
act.sa_flags |= SA_RESTART;
#endif
if ( sigaction( SIGCHLD, &act, &oldactChld ) != 0 )
- tqWarning( "Error installing SIGCHLD handler" );
+ qWarning( "Error installing SIGCHLD handler" );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
+ qDebug( "QProcessManager: install a SIGPIPE handler (SIG_IGN)" );
#endif
act.sa_handler = QT_SIGNAL_IGNORE;
sigemptyset( &(act.sa_mask) );
sigaddset( &(act.sa_mask), SIGPIPE );
act.sa_flags = 0;
if ( sigaction( SIGPIPE, &act, &oldactPipe ) != 0 )
- tqWarning( "Error installing SIGPIPE handler" );
+ qWarning( "Error installing SIGPIPE handler" );
}
QProcessManager::~QProcessManager()
@@ -320,23 +320,23 @@ QProcessManager::~QProcessManager()
// restore SIGCHLD handler
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: restore old sigchild handler" );
+ qDebug( "QProcessManager: restore old sigchild handler" );
#endif
if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
- tqWarning( "Error restoring SIGCHLD handler" );
+ qWarning( "Error restoring SIGCHLD handler" );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: restore old sigpipe handler" );
+ qDebug( "QProcessManager: restore old sigpipe handler" );
#endif
if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
- tqWarning( "Error restoring SIGPIPE handler" );
+ qWarning( "Error restoring SIGPIPE handler" );
}
void QProcessManager::append( QProc *p )
{
procList->append( p );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
+ qDebug( "QProcessManager: append process (procList.count(): %d)", procList->count() );
#endif
}
@@ -344,7 +344,7 @@ void QProcessManager::remove( QProc *p )
{
procList->remove( p );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
+ qDebug( "QProcessManager: remove process (procList.count(): %d)", procList->count() );
#endif
cleanup();
}
@@ -359,7 +359,7 @@ void QProcessManager::cleanup()
void QProcessManager::removeMe()
{
if ( procList->count() == 0 ) {
- tqRemovePostRoutine(qprocess_cleanup);
+ qRemovePostRoutine(qprocess_cleanup);
QProcessPrivate::procManager = 0;
delete this;
}
@@ -381,7 +381,7 @@ void QProcessManager::sigchldHnd( int fd )
char tmp;
::read( fd, &tmp, sizeof(tmp) );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager::sigchldHnd()" );
+ qDebug( "QProcessManager::sigchldHnd()" );
#endif
QProc *proc;
QProcess *process;
@@ -393,7 +393,7 @@ void QProcessManager::sigchldHnd( int fd )
if ( process != 0 ) {
if ( !process->isRunning() ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess available)", proc->pid );
#endif
/*
Apparently, there is not consistency among different
@@ -415,14 +415,14 @@ void QProcessManager::sigchldHnd( int fd )
// read pending data
if ( proc->socketStdout && ::ioctl(proc->socketStdout, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stdout", proc->pid, nbytes );
#endif
process->socketRead( proc->socketStdout );
}
nbytes = 0;
if ( proc->socketStderr && ::ioctl(proc->socketStderr, FIONREAD, (char*)&nbytes)==0 && nbytes>0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): reading %d bytes of pending data on stderr", proc->pid, nbytes );
#endif
process->socketRead( proc->socketStderr );
}
@@ -450,7 +450,7 @@ void QProcessManager::sigchldHnd( int fd )
int status;
if ( ::waitpid( proc->pid, &status, WNOHANG ) == proc->pid ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
+ qDebug( "QProcessManager::sigchldHnd() (PID: %d): process exited (QProcess not available)", proc->pid );
#endif
removeProc = TRUE;
}
@@ -480,7 +480,7 @@ QProcessManager *QProcessPrivate::procManager = 0;
QProcessPrivate::QProcessPrivate()
{
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessPrivate: Constructor" );
+ qDebug( "QProcessPrivate: Constructor" );
#endif
stdinBufRead = 0;
@@ -497,7 +497,7 @@ QProcessPrivate::QProcessPrivate()
QProcessPrivate::~QProcessPrivate()
{
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcessPrivate: Destructor" );
+ qDebug( "QProcessPrivate: Destructor" );
#endif
if ( proc != 0 ) {
@@ -543,7 +543,7 @@ void QProcessPrivate::newProc( pid_t pid, QProcess *process )
proc = new QProc( pid, process );
if ( procManager == 0 ) {
procManager = new QProcessManager;
- tqAddPostRoutine(qprocess_cleanup);
+ qAddPostRoutine(qprocess_cleanup);
}
// the QProcessManager takes care of deleting the QProc instances
procManager->append( proc );
@@ -700,7 +700,7 @@ QProcess::~QProcess()
bool QProcess::start( QStringList *env )
{
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::start()" );
+ qDebug( "QProcess::start()" );
#endif
reset();
@@ -760,7 +760,7 @@ bool QProcess::start( QStringList *env )
arglistQ[i] = (*it).local8Bit();
arglist[i] = arglistQ[i];
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
+ qDebug( "QProcess::start(): arg %d = %s", i, arglist[i] );
#endif
i++;
}
@@ -788,7 +788,7 @@ bool QProcess::start( QStringList *env )
// in case the process exits quickly.
if ( d->procManager == 0 ) {
d->procManager = new QProcessManager;
- tqAddPostRoutine(qprocess_cleanup);
+ qAddPostRoutine(qprocess_cleanup);
}
// fork and exec
@@ -969,7 +969,7 @@ bool QProcess::start( QStringList *env )
error:
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::start(): error starting process" );
+ qDebug( "QProcess::start(): error starting process" );
#endif
if ( d->procManager )
d->procManager->cleanup();
@@ -1050,7 +1050,7 @@ bool QProcess::isRunning() const
{
if ( d->exitValuesCalculated ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::isRunning(): FALSE (already computed)" );
+ qDebug( "QProcess::isRunning(): FALSE (already computed)" );
#endif
return FALSE;
}
@@ -1080,12 +1080,12 @@ bool QProcess::isRunning() const
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+ qDebug( "QProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
#endif
return FALSE;
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+ qDebug( "QProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
#endif
return TRUE;
}
@@ -1142,7 +1142,7 @@ bool QProcess::canReadLineStderr() const
void QProcess::writeToStdin( const QByteArray& buf )
{
#if defined(QT_QPROCESS_DEBUG)
-// tqDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
+// qDebug( "QProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
#endif
d->stdinBuf.enqueue( new QByteArray(buf) );
if ( d->notifierStdin != 0 )
@@ -1169,10 +1169,10 @@ void QProcess::closeStdin()
delete d->notifierStdin;
d->notifierStdin = 0;
if ( ::close( d->proc->socketStdin ) != 0 ) {
- tqWarning( "Could not close stdin of child process" );
+ qWarning( "Could not close stdin of child process" );
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
+ qDebug( "QProcess::closeStdin(): stdin (%d) closed", d->proc->socketStdin );
#endif
d->proc->socketStdin = 0;
}
@@ -1193,7 +1193,7 @@ void QProcess::socketRead( int fd )
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketRead(): %d", fd );
+ qDebug( "QProcess::socketRead(): %d", fd );
#endif
if ( fd == 0 )
return;
@@ -1229,7 +1229,7 @@ void QProcess::socketRead( int fd )
if ( n == 0 || n == -1 ) {
if ( fd == d->proc->socketStdout ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
+ qDebug( "QProcess::socketRead(): stdout (%d) closed", fd );
#endif
d->notifierStdout->setEnabled( FALSE );
delete d->notifierStdout;
@@ -1239,7 +1239,7 @@ void QProcess::socketRead( int fd )
return;
} else if ( fd == d->proc->socketStderr ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
+ qDebug( "QProcess::socketRead(): stderr (%d) closed", fd );
#endif
d->notifierStderr->setEnabled( FALSE );
delete d->notifierStderr;
@@ -1279,13 +1279,13 @@ void QProcess::socketRead( int fd )
d->socketReadCalled = TRUE;
if ( fd == d->proc->socketStdout ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketRead(): %d bytes read from stdout (%d)",
+ qDebug( "QProcess::socketRead(): %d bytes read from stdout (%d)",
buffer->size()-oldSize, fd );
#endif
emit readyReadStdout();
} else if ( fd == d->proc->socketStderr ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketRead(): %d bytes read from stderr (%d)",
+ qDebug( "QProcess::socketRead(): %d bytes read from stderr (%d)",
buffer->size()-oldSize, fd );
#endif
emit readyReadStderr();
@@ -1309,7 +1309,7 @@ void QProcess::socketWrite( int fd )
d->stdinBuf.head()->data() + d->stdinBufRead,
d->stdinBuf.head()->size() - d->stdinBufRead );
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "QProcess::socketWrite(): wrote %d bytes to stdin (%d)", ret, fd );
+ qDebug( "QProcess::socketWrite(): wrote %d bytes to stdin (%d)", ret, fd );
#endif
if ( ret == -1 )
return;