Go to the documentation of this file.
30 #include <QStringList>
42 const QStringList &
args,
44 const QString& startPath,
53 if (!startPath.isEmpty())
54 legacy->SetDirectory(startPath);
57 if ((ac & flags) == ac)
123 if (!
m_legacy->GetBuffer(0)->isOpen() &&
124 !
m_legacy->GetBuffer(0)->open(QIODevice::WriteOnly))
141 if (!
m_legacy->GetBuffer(1)->isOpen() &&
142 !
m_legacy->GetBuffer(1)->open(QIODevice::ReadOnly))
159 if (!
m_legacy->GetBuffer(2)->isOpen() &&
160 !
m_legacy->GetBuffer(2)->open(QIODevice::ReadOnly))
206 const QStringList &
args,
208 const QString& startPath,
213 args, flags, startPath, cpuPriority, diskPriority);
219 const QString& startPath,
224 args.simplified().split(
' '), flags, startPath,
225 cpuPriority, diskPriority);
@ kMSStdErr
allow access to stderr
MythSystemLegacyWrapper(MythSystemLegacy *legacy, uint flags)
QString GetStartingPath(void) const override
Returns the starting path of the program.
class for managing sub-processes.
QIODevice * GetStandardOutputStream(void) override
Returns the standard output stream for the program if the kMSStdOut flag was passed to the constructo...
uint GetFlags(void) const override
Returns the flags passed to the constructor.
Priority GetDiskPriority(void) const override
Return the Disk Priority of the program.
Priority GetCPUPriority(void) const override
Return the CPU Priority of the program.
@ GENERIC_EXIT_KILLED
Process killed or stopped.
static MythSystemLegacyWrapper * Create(const QStringList &args, uint flags, const QString &startPath, Priority, Priority)
int GetExitCode(void) const override
returns the exit code, if any, that the program returned.
void Signal(MythSignal sig) override
Sends the selected signal to the program.
QIODevice * GetStandardInputStream(void) override
Returns the standard input stream for the program if the kMSStdIn flag was passed to the constructor.
@ GENERIC_EXIT_RUNNING
Process is running.
@ kMSAutoCleanup
automatically delete if backgrounded
@ kMSRunBackground
run child in the background
~MythSystemLegacyWrapper(void) override
QScopedPointer< MythSystemLegacy > m_legacy
bool Wait(std::chrono::milliseconds timeout) override
Blocks until child process is collected or timeout reached.
QIODevice * GetStandardErrorStream(void) override
Returns the standard error stream for the program if the kMSStdErr flag was passed to the constructor...
@ kNormalPriority
run as a normal program
@ kMSStdIn
allow access to stdin
@ kMSStdOut
allow access to stdout
static MythSystem * Create(const QStringList &args, uint flags=kMSNone, const QString &startPath=QString(), Priority cpuPriority=kInheritPriority, Priority diskPriority=kInheritPriority)