summaryrefslogtreecommitdiff
path: root/library/global.cpp
Unidiff
Diffstat (limited to 'library/global.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/global.cpp b/library/global.cpp
index e5fc2b3..fd7579a 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -484,49 +484,49 @@ void Global::invoke(const QString &c)
484 args[j] = NULL; 484 args[j] = NULL;
485 485
486#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 486#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
487 // an attempt to show a wait... 487 // an attempt to show a wait...
488 // more logic should be used, but this will be fine for the moment... 488 // more logic should be used, but this will be fine for the moment...
489 QCopEnvelope ( "QPE/System", "busy()" ); 489 QCopEnvelope ( "QPE/System", "busy()" );
490#endif 490#endif
491 491
492#ifdef HAVE_QUICKEXEC 492#ifdef HAVE_QUICKEXEC
493 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; 493 QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so";
494 qDebug("libfile = %s", libexe.latin1() ); 494 qDebug("libfile = %s", libexe.latin1() );
495 if ( QFile::exists( libexe ) ) { 495 if ( QFile::exists( libexe ) ) {
496 qDebug("calling quickexec %s", libexe.latin1() ); 496 qDebug("calling quickexec %s", libexe.latin1() );
497 quickexecv( libexe.utf8().data(), (const char **)args ); 497 quickexecv( libexe.utf8().data(), (const char **)args );
498 } else 498 } else
499#endif 499#endif
500 { 500 {
501 if ( !::vfork() ) { 501 if ( !::vfork() ) {
502 for ( int fd = 3; fd < 100; fd++ ) 502 for ( int fd = 3; fd < 100; fd++ )
503 ::close( fd ); 503 ::close( fd );
504 ::setpgid( ::getpid(), ::getppid() ); 504 ::setpgid( ::getpid(), ::getppid() );
505 // Try bindir first, so that foo/bar works too 505 // Try bindir first, so that foo/bar works too
506 ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args ); 506 ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args );
507 ::execvp( args[0], (char * const *)args ); 507 ::execvp( args[0], (char * const *)args );
508 exit( -1 ); 508 _exit( -1 );
509 } 509 }
510 } 510 }
511 StartingAppList::add( list[0] ); 511 StartingAppList::add( list[0] );
512#endif //QT_NO_QWS_MULTIPROCESS 512#endif //QT_NO_QWS_MULTIPROCESS
513} 513}
514 514
515/*! 515/*!
516 Executes application identfied by \a c, passing \a document. 516 Executes application identfied by \a c, passing \a document.
517 517
518 Note that you might be better off sending a QCop message to 518 Note that you might be better off sending a QCop message to
519 the application's QPE/Application/<i>appname</i> channel. 519 the application's QPE/Application/<i>appname</i> channel.
520*/ 520*/
521void Global::execute( const QString &c, const QString& document ) 521void Global::execute( const QString &c, const QString& document )
522{ 522{
523 if ( qApp->type() != QApplication::GuiServer ) { 523 if ( qApp->type() != QApplication::GuiServer ) {
524 // ask the server to do the work 524 // ask the server to do the work
525#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 525#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
526 if ( document.isNull() ) { 526 if ( document.isNull() ) {
527 QCopEnvelope e( "QPE/System", "execute(QString)" ); 527 QCopEnvelope e( "QPE/System", "execute(QString)" );
528 e << c; 528 e << c;
529 } else { 529 } else {
530 QCopEnvelope e( "QPE/System", "execute(QString,QString)" ); 530 QCopEnvelope e( "QPE/System", "execute(QString,QString)" );
531 e << c << document; 531 e << c << document;
532 } 532 }