-rw-r--r-- | library/global.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/global.cpp b/library/global.cpp index 68a3a75..ce39751 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -111,5 +111,5 @@ StartingAppList::StartingAppList( QObject *parent, const char* name ) connect( qwsServer, SIGNAL( newChannel(const QString&)), this, SLOT( handleNewChannel(const QString&)) ); -#endif +#endif dict.setAutoDelete( TRUE ); } @@ -389,5 +389,5 @@ void Global::createDocDir() void Global::statusMessage(const QString& message) { -#if!defined(QT_NO_COP) +#if !defined(QT_NO_COP) QCopEnvelope e( "QPE/TaskBar", "message(QString)" ); e << message; @@ -562,5 +562,5 @@ void Global::invoke(const QString &c) // If the channel is already register, the app is already running, so show it. { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } - + QCopEnvelope e("QPE/System", "notBusy(QString)" ); e << ap; @@ -605,12 +605,12 @@ void Global::invoke(const QString &c) } else #endif - { - bool success = false; + { + bool success = false; int pfd [2]; if ( ::pipe ( pfd ) < 0 ) pfd [0] = pfd [1] = -1; - + pid_t pid = ::fork ( ); - + if ( pid == 0 ) { // child for ( int fd = 3; fd < 100; fd++ ) { @@ -623,18 +623,18 @@ void Global::invoke(const QString &c) if ( pfd [1] >= 0 ) ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); - + // Try bindir first, so that foo/bar works too ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); ::execvp ( args [0], (char * const *) args ); - + char resultByte = 1; if ( pfd [1] >= 0 ) ::write ( pfd [1], &resultByte, 1 ); - ::_exit ( -1 ); + ::_exit ( -1 ); } else if ( pid > 0 ) { success = true; - - if ( pfd [1] >= 0 ) + + if ( pfd [1] >= 0 ) ::close ( pfd [1] ); if ( pfd [0] >= 0 ) { @@ -648,5 +648,5 @@ void Global::invoke(const QString &c) if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) continue; - + break; // success } @@ -654,5 +654,5 @@ void Global::invoke(const QString &c) } } - if ( success ) + if ( success ) StartingAppList::add( list[0] ); else |