author | zecke <zecke> | 2003-12-20 13:06:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-12-20 13:06:29 (UTC) |
commit | d9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1 (patch) (side-by-side diff) | |
tree | 1d808cf09131926e6ab6a00e75d9b92182c49365 | |
parent | afabf4e4cb1211dd17e0ba0ff77133335d4735b9 (diff) | |
download | opie-d9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1.zip opie-d9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1.tar.gz opie-d9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1.tar.bz2 |
Do not use LD_BIND_NOW for now.
I hope ljp gets some numbers for that soon...
-rw-r--r-- | core/launcher/applauncher.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index 0ac043b..0db99dd 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp @@ -611,97 +611,104 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais return TRUE; } void AppLauncher::kill( int pid ) { #ifndef Q_OS_WIN32 ::kill( pid, SIGTERM ); #else for ( QProcess *proc = runningAppsProc.first(); proc; proc = runningAppsProc.next() ) { if ( proc->processIdentifier() == pid ) { proc->kill(); break; } } #endif } int AppLauncher::pidForName( const QString &appName ) { int pid = -1; QMap<int, QString>::Iterator it; for (it = runningApps.begin(); it!= runningApps.end(); ++it) { if (*it == appName) { pid = it.key(); break; } } return pid; } void AppLauncher::createQuickLauncher() { static bool disabled = FALSE; if (disabled) return; qlReady = FALSE; qlPid = ::vfork(); if ( !qlPid ) { char **args = new char *[2]; args[0] = "quicklauncher"; args[1] = 0; for ( int fd = 3; fd < 100; fd++ ) ::close( fd ); ::setpgid( ::getpid(), ::getppid() ); // Try bindir first, so that foo/bar works too - setenv( "LD_BIND_NOW", "1", 1 ); + /* + * LD_BIND_NOW will change the behaviour of ld.so and dlopen + * RTLD_LAZY will be made RTLD_NOW which leads to problem + * with miscompiled libraries... if LD_BIND_NOW is set.. there + * is no way back.. We will wait for numbers from TT to see + * if using LD_BIND_NOW is worth it - zecke + */ +// setenv( "LD_BIND_NOW", "1", 1 ); ::execv( QPEApplication::qpeDir()+"bin/quicklauncher", args ); ::execvp( "quicklauncher", args ); delete []args; disabled = TRUE; _exit( -1 ); } else if ( qlPid == -1 ) { qlPid = 0; } else { if ( getuid() == 0 ) setpriority( PRIO_PROCESS, qlPid, 19 ); } } // Used only by Win32 void AppLauncher::processExited() { #ifdef Q_OS_WIN32 qDebug("AppLauncher::processExited()"); bool found = FALSE; QProcess *proc = (QProcess *) sender(); if (!proc){ qDebug("Interanl error NULL proc"); return; } QString appName = proc->arguments()[0]; qDebug("Removing application %s", appName.latin1()); runningAppsProc.remove(proc); QMap<QString,int>::Iterator hbit = waitingHeartbeat.find(appName); if ( hbit != waitingHeartbeat.end() ) { killTimer( *hbit ); waitingHeartbeat.remove( hbit ); } if ( appName == appKillerName ) { appKillerName = QString::null; delete appKillerBox; appKillerBox = 0; } // Search for the app to find its PID QMap<int, QString>::Iterator it; for (it = runningApps.begin(); it!= runningApps.end(); ++it){ if (it.data() == appName){ found = TRUE; break; } } |