cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
windowsfork.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef WINDOWSFORK_H
6#define WINDOWSFORK_H
7
8#include "abstractfork.h"
9
10#include <QObject>
11#include <QProcess>
12
13class QTimer;
15{
17public:
18 explicit WindowsFork(QObject *parent = nullptr);
19
20 virtual bool continueMaster(int *exit = nullptr) override;
21
22 virtual int exec(bool lazy, bool master) override;
23
24 virtual void killChild() override;
25 virtual void terminateChild() override;
26
27 virtual void restart() override;
28
29private:
30 void startChild();
31 void childFinished(int exitCode, QProcess::ExitStatus exitStatus);
32 void restartTerminate();
33
34 QProcess *m_masterChildProcess = nullptr;
35 QTimer *m_materChildRestartTimer = nullptr;
36 int m_autoReloadCount = 0;
37};
38
39#endif // WINDOWSFORK_H
virtual void restart() override
virtual void terminateChild() override
virtual int exec(bool lazy, bool master) override
virtual bool continueMaster(int *exit=nullptr) override
virtual void killChild() override
Q_OBJECTQ_OBJECT
QObject * parent() const const