diff --git a/src/launcher/booster.cpp b/src/launcher/booster.cpp index 13fdb73..7598e0e 100644 --- a/src/launcher/booster.cpp +++ b/src/launcher/booster.cpp @@ -228,15 +228,18 @@ void* Booster::loadMain() void * module = dlopen(m_app.fileName().c_str(), RTLD_LAZY | RTLD_GLOBAL); if (!module) - Logger::logErrorAndDie(EXIT_FAILURE, "Booster: loading invoked application: '%s'\n", dlerror()); + Logger::logErrorAndDie(EXIT_FAILURE, "Booster: Loading invoked application failed: '%s'\n", dlerror()); + + // Find out the address for symbol "main". dlerror() is first used to clear any old error conditions, + // then dlsym() is called, and then dlerror() is checked again. This procedure is documented + // in dlsym()'s man page. - // Find out the address for symbol "main". dlerror(); m_app.setEntry(reinterpret_cast(dlsym(module, "main"))); const char * error_s = dlerror(); if (error_s != NULL) - Logger::logErrorAndDie(EXIT_FAILURE, "Booster: loading symbol 'main': '%s'\n", error_s); + Logger::logErrorAndDie(EXIT_FAILURE, "Booster: Loading symbol 'main' failed: '%s'\n", error_s); return module; } diff --git a/src/launcher/booster.h b/src/launcher/booster.h index 3f8551b..6ef906e 100644 --- a/src/launcher/booster.h +++ b/src/launcher/booster.h @@ -125,16 +125,26 @@ private: //! Disable assignment operator Booster & operator= (const Booster & r); + //! Load the library and jump to main + int launchProcess(); - void complainAndExit(); - int launchProcess(); + //! Helper method: load the library and find out address for "main". void* loadMain(); + //! Data structure representing the application to be invoked AppData m_app; + + //! Socket connection to invoker Connection* m_conn; + //! Size (length) of the argument vector int m_argvArraySize; + + //! Process priority before pushPriority() is called int m_oldPriority; + + //! True if m_oldPriority is a valid value so that + //! it can be restored later. bool m_oldPriorityOk; #ifdef UNIT_TEST