cutelyst  4.4.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 
13 class QTimer;
14 class WindowsFork : public AbstractFork
15 {
16  Q_OBJECT
17 public:
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 
29 private:
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
Definition: windowsfork.cpp:72
virtual void terminateChild() override
Definition: windowsfork.cpp:65
virtual int exec(bool lazy, bool master) override
Definition: windowsfork.cpp:49
virtual bool continueMaster(int *exit=nullptr) override
Definition: windowsfork.cpp:20
virtual void killChild() override
Definition: windowsfork.cpp:58
Q_OBJECTQ_OBJECT
QObject * parent() const const