#include <AsyncFw/MainThread>
#include <AsyncFw/SystemProcess>
#include <AsyncFw/Timer>
#include <AsyncFw/LogStream>
int main(int argc, char *argv[]) {
process.
output([](
const std::string &str,
bool err) {
if (!err) logInfo() << "OUT:" << '\n' + str;
else { logError() << "ERR:" << '\n' + str; }
});
if (_s == AsyncFw::SystemProcess::Running) return;
AsyncFw::MainThread::exit(0);
});
process.
start(
"/bin/bash");
logNotice() << "Start Applicaiton";
int ret = AsyncFw::MainThread::exec();
return ret;
}
The SystemProcess class.
Definition SystemProcess.h:16
FunctionConnectorProtected< SystemProcess >::Connector< State > stateChanged
The FunctionConnector for SystemProcess stateChanged.
Definition SystemProcess.h:30
FunctionConnectorProtected< SystemProcess >::Connector< const std::string &, bool > output
The FunctionConnector for SystemProcess output.
Definition SystemProcess.h:32
static void single(int ms, T function)
Starts a single shot timer with the specified timeout.
Definition Timer.h:19