Files
salmanoff/main.cpp
T

30 lines
827 B
C++
Raw Normal View History

2025-01-04 13:21:33 -04:00
#include <iostream>
#include <pthread.h>
#include <componentThread.h>
#include <marionette/marionette.h>
2024-09-04 14:08:50 +10:00
2025-09-03 14:43:00 -04:00
int main(int argc, char *argv[], char *envp[])
2024-09-04 14:08:50 +10:00
{
pthread_setname_np(pthread_self(), "CRT:main");
/* 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';
smo::mrntt::thread->getIoService().post(
[argc, argv, envp]()
{
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
<< '\n';
smo::CrtCommandLineArgs::set(argc, argv, envp);
smo::mrntt::thread->getIoService().stop();
}
);
smo::mrntt::thread->thread.join();
std::cout << "CRT:" << __func__ << ": Mrntt exited with code '"
<< smo::mrntt::exitCode << "'\n";
return smo::mrntt::exitCode;
}