set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
-check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
-check_symbol_exists(prctl "sys/prctl.h" HAVE_PRCTL)
-
# Monero configuration
set(BUILD_GUI_DEPS ON)
set(BUILD_64 ON)
target_compile_definitions(feather PRIVATE STACK_TRACE=1)
endif()
-if(HAVE_SYS_PRCTL_H)
- target_compile_definitions(feather PRIVATE HAVE_SYS_PRCTL_H=1)
-endif()
-
if(STATIC)
target_compile_definitions(feather PRIVATE STATIC=1)
endif()
XmRig::XmRig(const QString &configDir, QObject *parent)
: QObject(parent)
- , m_process(new ChildProcess(this))
+ , m_process(new QProcess(this))
{
m_process->setProcessChannelMode(QProcess::MergedChannels);
connect(m_process, &QProcess::readyReadStandardOutput, this, &XmRig::handleProcessOutput);
#ifndef FEATHER_XMRIG_H
#define FEATHER_XMRIG_H
-#include <cstdio>
-#include <cstdlib>
-#include <iostream>
-#include <QRegularExpression>
-#include <QtNetwork>
-#include <QApplication>
-#include <QMainWindow>
-
-#include "utils/childproc.h"
+#include <QProcess>
class XmRig : public QObject
{
void handleProcessError(QProcess::ProcessError error);
private:
- ChildProcess *m_process;
+ QProcess *m_process;
QProcess m_killProcess;
bool m_elevated;
};
TorManager::TorManager(QObject *parent)
: QObject(parent)
, m_checkConnectionTimer(new QTimer(this))
- , m_process(new ChildProcess(this))
+ , m_process(new QProcess(this))
{
connect(m_checkConnectionTimer, &QTimer::timeout, this, &TorManager::checkConnection);
#include <iostream>
#include <QRegularExpression>
#include <QtNetwork>
-#include "utils/childproc.h"
#include "utils/SemanticVersion.h"
class TorManager : public QObject
static QPointer<TorManager> m_instance;
- ChildProcess *m_process;
+ QProcess *m_process;
int m_restarts = 0;
bool m_stopRetries = false;
bool m_localTor;
+++ /dev/null
-// SPDX-License-Identifier: BSD-3-Clause
-// SPDX-FileCopyrightText: 2020-2023 The Monero Project
-
-#include "utils/childproc.h"
-
-ChildProcess::ChildProcess(QObject* parent) {}
-ChildProcess::~ChildProcess() {}
-
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-void ChildProcess::setupChildProcess() {
-#if defined(HAVE_SYS_PRCTL_H) && defined(Q_OS_UNIX)
- // https://smackerelofopinion.blogspot.com/2015/11/using-prsetpdeathsig-to-reap-child.html
- ::prctl(PR_SET_PDEATHSIG, SIGKILL);
-#endif
-}
-#endif
\ No newline at end of file
+++ /dev/null
-// SPDX-License-Identifier: BSD-3-Clause
-// SPDX-FileCopyrightText: 2020-2023 The Monero Project
-
-#ifndef FEATHER_FPROCESS_H
-#define FEATHER_FPROCESS_H
-
-#include <QProcess>
-
-#if defined(HAVE_SYS_PRCTL_H) && defined(Q_OS_UNIX)
-#include <signal.h>
-#include <sys/prctl.h>
-#endif
-
-class ChildProcess : public QProcess {
- Q_OBJECT
-public:
- explicit ChildProcess(QObject *parent);
- ~ChildProcess() override;
-protected:
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- void setupChildProcess() override;
-#endif
-};
-
-
-#endif //FEATHER_FPROCESS_H