Go to the documentation of this file.
3 #ifndef MYTHSYSTEM_UNIX_H
4 #define MYTHSYSTEM_UNIX_H
8 #include <sys/select.h>
12 #include <QStringList>
16 #include <QWaitCondition>
28 using MSMap_t = QMap<pid_t, QPointer<MythSystemLegacyUnix> >;
30 using MSList_t = QList<QPointer<MythSystemLegacyUnix> >;
36 :
MThread(QString(
"SystemIOHandler%1").arg(
read ?
"R" :
"W")),
39 void run(
void)
override;
41 void insert(
int fd, QBuffer *buff);
70 void run(
void)
override;
85 :
MThread(
"SystemSignalManager") {}
87 void run(
void)
override;
101 void Manage(
void)
override;
104 void Signal(
int sig)
override;
107 bool ParseShell(
const QString &cmd, QString &abscmd,
108 QStringList &
args)
override;
118 std::array<int,3> m_stdpipe {-1, -1, -1};
121 #endif // MYTHSYSTEM_UNIX_H
void run(void) override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
def read(device=None, features=[])
std::chrono::time_point< SystemClock > SystemTime
virtual void Term(bool force=false)=0
MythSystemLegacySignalManager()
QMap< pid_t, QPointer< MythSystemLegacyUnix > > MSMap_t
void run(void) override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
virtual bool ParseShell(const QString &cmd, QString &abscmd, QStringList &args)=0
MythSystemLegacyManager()
QMap< int, QBuffer * > PMap_t
QList< QPointer< MythSystemLegacyUnix > > MSList_t
virtual void Signal(int sig)=0
MythSystemLegacyIOHandler(bool read)
~MythSystemLegacyManager() override
void HandleWrite(int fd, QBuffer *buff)
void append(MythSystemLegacyUnix *ms)
virtual void Fork(std::chrono::seconds timeout)=0
std::array< char, 65536 > m_readbuf
This is a wrapper around QThread that does several additional things.
virtual void JumpAbort(void)=0
~MythSystemLegacySignalManager() override
~MythSystemLegacyIOHandler() override
void insert(int fd, QBuffer *buff)
void run(void) override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
virtual void Manage(void)=0
void HandleRead(int fd, QBuffer *buff)