author | sandman <sandman> | 2002-12-01 22:23:22 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-01 22:23:22 (UTC) |
commit | 184ab086906979cdb9c2cc8b601bcd0ecc095576 (patch) (unidiff) | |
tree | 5e5ac0e6051529253bf28d5a58ae74680a47b776 /library | |
parent | 5a550802680d32ccb0ea0d596f514de7e13c45dc (diff) | |
download | opie-184ab086906979cdb9c2cc8b601bcd0ecc095576.zip opie-184ab086906979cdb9c2cc8b601bcd0ecc095576.tar.gz opie-184ab086906979cdb9c2cc8b601bcd0ecc095576.tar.bz2 |
The new preload library has to be used always, because of some binary
incompatibility between apps built with older tcs and shared libs built
with newer tcs. (see cvs comment for core/launcher/libpreload/preload.cpp)
-rw-r--r-- | library/global.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/global.cpp b/library/global.cpp index 42c2729..2162e02 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -593,36 +593,34 @@ void Global::invoke(const QString &c) | |||
593 | // an attempt to show a wait... | 593 | // an attempt to show a wait... |
594 | // more logic should be used, but this will be fine for the moment... | 594 | // more logic should be used, but this will be fine for the moment... |
595 | QCopEnvelope ( "QPE/System", "busy()" ); | 595 | QCopEnvelope ( "QPE/System", "busy()" ); |
596 | #endif | 596 | #endif |
597 | 597 | ||
598 | #ifdef HAVE_QUICKEXEC | 598 | #ifdef HAVE_QUICKEXEC |
599 | QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; | 599 | QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; |
600 | qDebug("libfile = %s", libexe.latin1() ); | 600 | qDebug("libfile = %s", libexe.latin1() ); |
601 | if ( QFile::exists( libexe ) ) { | 601 | if ( QFile::exists( libexe ) ) { |
602 | qDebug("calling quickexec %s", libexe.latin1() ); | 602 | qDebug("calling quickexec %s", libexe.latin1() ); |
603 | quickexecv( libexe.utf8().data(), (const char **)args ); | 603 | quickexecv( libexe.utf8().data(), (const char **)args ); |
604 | } else | 604 | } else |
605 | #endif | 605 | #endif |
606 | { | 606 | { |
607 | char *oldpre = ::getenv ( "LD_PRELOAD" ); | 607 | char *oldpre = ::getenv ( "LD_PRELOAD" ); |
608 | 608 | ||
609 | extern bool opie_block_style; | ||
610 | |||
611 | QString newpre = QPEApplication::qpeDir ( ) + "/lib/libpreload.so"; | 609 | QString newpre = QPEApplication::qpeDir ( ) + "/lib/libpreload.so"; |
612 | if ( opie_block_style && QFile::exists ( newpre )) { | 610 | if ( QFile::exists ( newpre )) { |
613 | if ( oldpre && oldpre [0] ) | 611 | if ( oldpre && oldpre [0] ) |
614 | newpre = newpre + ":" + oldpre; | 612 | newpre = newpre + ":" + oldpre; |
615 | ::setenv ( "LD_PRELOAD", newpre. latin1( ), 1 ); | 613 | ::setenv ( "LD_PRELOAD", newpre. latin1( ), 1 ); |
616 | qDebug ( "\nPRELOADING\n" ); | 614 | qDebug ( "\nPRELOADING\n" ); |
617 | } | 615 | } |
618 | 616 | ||
619 | if ( !::vfork() ) { | 617 | if ( !::vfork() ) { |
620 | for ( int fd = 3; fd < 100; fd++ ) | 618 | for ( int fd = 3; fd < 100; fd++ ) |
621 | ::close( fd ); | 619 | ::close( fd ); |
622 | ::setpgid( ::getpid(), ::getppid() ); | 620 | ::setpgid( ::getpid(), ::getppid() ); |
623 | // Try bindir first, so that foo/bar works too | 621 | // Try bindir first, so that foo/bar works too |
624 | ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args ); | 622 | ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args ); |
625 | ::execvp( args[0], (char * const *)args ); | 623 | ::execvp( args[0], (char * const *)args ); |
626 | _exit( -1 ); | 624 | _exit( -1 ); |
627 | } | 625 | } |
628 | if ( oldpre ) | 626 | if ( oldpre ) |