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);
static MythSystemLegacyWrapper * Create(const QStringList &args, uint flags, const QString &startPath, Priority, Priority)
Priority GetCPUPriority(void) const override
Return the CPU Priority of the program.
int GetExitCode(void) const override
returns the exit code, if any, that the program returned.
QIODevice * GetStandardInputStream(void) override
Returns the standard input stream for the program if the kMSStdIn flag was passed to the constructor.
uint GetFlags(void) const override
Returns the flags passed to the constructor.
bool Wait(std::chrono::milliseconds timeout) override
Blocks until child process is collected or timeout reached.
void Signal(MythSignal sig) override
Sends the selected signal to the program.
QString GetStartingPath(void) const override
Returns the starting path of the program.
Priority GetDiskPriority(void) const override
Return the Disk Priority of the program.
QIODevice * GetStandardErrorStream(void) override
Returns the standard error stream for the program if the kMSStdErr flag was passed to the constructor...
QIODevice * GetStandardOutputStream(void) override
Returns the standard output stream for the program if the kMSStdOut flag was passed to the constructo...
QScopedPointer< MythSystemLegacy > m_legacy
MythSystemLegacyWrapper(MythSystemLegacy *legacy, uint flags)
~MythSystemLegacyWrapper(void) override
class for managing sub-processes.
@ kNormalPriority
run as a normal program
static MythSystem * Create(const QStringList &args, uint flags=kMSNone, const QString &startPath=QString(), Priority cpuPriority=kInheritPriority, Priority diskPriority=kInheritPriority)
@ GENERIC_EXIT_RUNNING
Process is running.
@ GENERIC_EXIT_KILLED
Process killed or stopped.
@ kMSStdIn
allow access to stdin
@ kMSStdErr
allow access to stderr
@ kMSStdOut
allow access to stdout
@ kMSRunBackground
run child in the background
@ kMSAutoCleanup
automatically delete if backgrounded