Changes: Comments in booster.h / booster.cpp improved. One useless

method declaration removed.
pull/1/head
Jussi Lind 15 years ago
parent e78012ffdb
commit 0195e8b9b3

@ -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<entry_t>(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;
}

@ -125,16 +125,26 @@ private:
//! Disable assignment operator
Booster & operator= (const Booster & r);
void complainAndExit();
//! Load the library and jump to main
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

Loading…
Cancel
Save