3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-01-31 07:12:18 +00:00
Brooklyn/plasma/workspace/startkde/waitforname/main.cpp

28 lines
506 B
C++
Raw Normal View History

2022-03-05 17:41:29 +00:00
/*
SPDX-FileCopyrightText: 2017 Valerio Pilo <vpilo@coldshock.net>
SPDX-License-Identifier: LGPL-2.0-only
*/
#include "waiter.h"
#include <signal.h>
void sigtermHandler(int signalNumber)
{
Q_UNUSED(signalNumber)
if (QCoreApplication::instance()) {
QCoreApplication::instance()->exit(-1);
}
}
int main(int argc, char **argv)
{
Waiter app(argc, argv);
signal(SIGTERM, sigtermHandler);
if (!app.waitForService()) {
return 0;
}
return app.exec();
}