#include #include #include #include #include #include #include #include #include namespace Process { void restartHyperion(bool asNewProcess) { Logger* log = Logger::getInstance("Process"); std::cout << std::endl << " *******************************************" << std::endl << " * hyperion will restart now *" << std::endl << " *******************************************" << std::endl << std::endl; QStringList qargs = QCoreApplication::arguments(); int size = qargs.size(); char *args[size+1]; args[size] = nullptr; for(int i=0; i pipe(popen(cmd.toLocal8Bit().constData(), "r"), pclose); if (pipe) { while (!feof(pipe.get())) { if (fgets(buffer, 128, pipe.get()) != NULL) result += buffer; } } return QSTRING_CSTR(result); } };