mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Apparently the first commit (59ae429972)
did not include all files.
Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
60 lines
1.2 KiB
C++
60 lines
1.2 KiB
C++
// Copyright 2007-2021 The Mumble Developers. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license
|
|
// that can be found in the LICENSE file at the root of the
|
|
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
|
|
|
#ifndef MUMBLE_MURMUR_UNIXMURMUR_H_
|
|
#define MUMBLE_MURMUR_UNIXMURMUR_H_
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QThread>
|
|
|
|
class QCoreApplication;
|
|
class QMutex;
|
|
class QSocketNotifier;
|
|
class QWaitCondition;
|
|
|
|
class LimitTest : public QThread {
|
|
Q_OBJECT
|
|
Q_DISABLE_COPY(LimitTest)
|
|
protected:
|
|
static QMutex *qm;
|
|
static QWaitCondition *qw, *qstartw;
|
|
LimitTest();
|
|
|
|
public:
|
|
int tid;
|
|
void run();
|
|
static void testLimits(QCoreApplication &);
|
|
};
|
|
|
|
class UnixMurmur : public QObject {
|
|
Q_OBJECT
|
|
Q_DISABLE_COPY(UnixMurmur)
|
|
protected:
|
|
bool bRoot;
|
|
static int iHupFd[2], iTermFd[2], iUsr1Fd[2];
|
|
QSocketNotifier *qsnHup, *qsnTerm, *qsnUsr1;
|
|
|
|
static void hupSignalHandler(int);
|
|
static void termSignalHandler(int);
|
|
static void usr1SignalHandler(int);
|
|
public slots:
|
|
void handleSigHup();
|
|
void handleSigTerm();
|
|
void handleSigUsr1();
|
|
|
|
public:
|
|
bool logToSyslog;
|
|
|
|
void setuid();
|
|
void initialcap();
|
|
void finalcap();
|
|
const QString trySystemIniFiles(const QString &fname);
|
|
|
|
UnixMurmur();
|
|
~UnixMurmur();
|
|
};
|
|
|
|
#endif
|