2025-01-04 13:21:33 -04:00
|
|
|
#include <iostream>
|
2025-11-06 15:04:04 -04:00
|
|
|
#include <pthread.h>
|
2025-07-28 07:20:44 -04:00
|
|
|
#include <componentThread.h>
|
|
|
|
|
#include <marionette/marionette.h>
|
2024-09-04 14:08:50 +10:00
|
|
|
|
2025-09-03 14:43:00 -04:00
|
|
|
|
2025-07-28 07:20:44 -04:00
|
|
|
int main(int argc, char *argv[], char *envp[])
|
2024-09-04 14:08:50 +10:00
|
|
|
{
|
2025-11-06 15:09:15 -04:00
|
|
|
pthread_setname_np(pthread_self(), "smo:CRT:main");
|
2025-07-28 07:20:44 -04:00
|
|
|
/* We don't do anything inside of main()
|
|
|
|
|
* Main merely waits for the marionette thread to exit.
|
|
|
|
|
*/
|
|
|
|
|
std::cout << "CRT:" << __func__ << ": about to JOLT Mrntt with cmdline args"
|
|
|
|
|
<< '\n';
|
2025-09-14 22:17:19 -04:00
|
|
|
smo::mrntt::thread->getIoService().post(
|
2025-07-28 07:20:44 -04:00
|
|
|
[argc, argv, envp]()
|
2025-01-11 06:19:11 -04:00
|
|
|
{
|
2025-07-28 07:20:44 -04:00
|
|
|
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
|
|
|
|
|
<< '\n';
|
|
|
|
|
smo::CrtCommandLineArgs::set(argc, argv, envp);
|
2025-09-14 22:17:19 -04:00
|
|
|
smo::mrntt::thread->getIoService().stop();
|
2025-07-28 07:20:44 -04:00
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
2025-09-14 22:17:19 -04:00
|
|
|
smo::mrntt::thread->thread.join();
|
2025-07-28 07:20:44 -04:00
|
|
|
std::cout << "CRT:" << __func__ << ": Mrntt exited with code '"
|
|
|
|
|
<< smo::mrntt::exitCode << "'\n";
|
|
|
|
|
return smo::mrntt::exitCode;
|
2025-01-10 17:37:49 -04:00
|
|
|
}
|