MythTV  master
mythsystemlegacy.cpp
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  * Class MythSystemLegacy
3  *
4  * Copyright (C) Gavin Hurlbut 2012
5  * Copyright (C) Issac Richards 2008
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 // compat header
23 #include "compat.h"
24 
25 // Own header
26 #include "mythsystemlegacy.h"
27 
28 // C++/C headers
29 #include <cerrno>
30 #include <csignal> // for kill() and SIGXXX
31 #include <cstdlib>
32 #include <cstring>
33 #include <ctime>
34 #include <fcntl.h>
35 #include <unistd.h>
36 
37 // QT headers
38 #include <QtGlobal>
39 #include <QCoreApplication>
40 
41 // libmythbase headers
42 #include "referencecounter.h"
43 #include "mythcorecontext.h"
44 #include "mythevent.h"
45 #include "mythlogging.h"
46 
47 #ifdef Q_OS_WIN
48 #include "mythsystemwindows.h"
49 #else
50 #include "mythsystemunix.h"
51 #endif
52 
53 
54 /*******************************
55  * MythSystemLegacy method defines
56  ******************************/
57 
59 {
60 #ifdef Q_OS_WIN
61  d = new MythSystemLegacyWindows(this);
62 #else
63  d = new MythSystemLegacyUnix(this);
64 #endif
65 }
66 
68  QObject(parent)
69 {
70  setObjectName("MythSystemLegacy()");
71  m_semReady.release(1); // initialize
73 }
74 
75 MythSystemLegacy::MythSystemLegacy(const QString &command, uint flags,
76  QObject *parent) :
77  QObject(parent)
78 {
79  setObjectName(QString("MythSystemLegacy(%1)").arg(command));
80  m_semReady.release(1); // initialize
82  SetCommand(command, flags);
83 }
84 
88 void MythSystemLegacy::SetCommand(const QString &command, uint flags)
89 {
90  if (flags & kMSRunShell)
91  {
92  SetCommand(command, QStringList(), flags);
93  }
94  else
95  {
96  QString abscommand;
97  QStringList args;
98  if (!d->ParseShell(command, abscommand, args))
99  {
100  LOG(VB_GENERAL, LOG_ERR,
101  QString("MythSystemLegacy(%1) command not understood")
102  .arg(command));
104  return;
105  }
106 
107  SetCommand(abscommand, args, flags);
108  }
109 
110  if (m_settings["UseStdin"])
111  m_stdbuff[0].open(QIODevice::WriteOnly);
112  if (m_settings["UseStdout"])
113  m_stdbuff[1].open(QIODevice::ReadOnly);
114  if (m_settings["UseStderr"])
115  m_stdbuff[2].open(QIODevice::ReadOnly);
116 }
117 
118 
119 MythSystemLegacy::MythSystemLegacy(const QString &command,
120  const QStringList &args,
121  uint flags,
122  QObject *parent) :
123  QObject(parent)
124 {
125  m_semReady.release(1); // initialize
127  SetCommand(command, args, flags);
128 }
129 
133 void MythSystemLegacy::SetCommand(const QString &command,
134  const QStringList &args, uint flags)
135 {
137  m_command = QString(command).trimmed();
138  m_args = QStringList(args);
139 
140  ProcessFlags(flags);
141 
142  // add logging arguments
143  if (GetSetting("PropagateLogs"))
144  {
145  if (GetSetting("UseShell") && m_args.isEmpty())
146  {
148  if (!logPropagateQuiet())
149  m_command += " --quiet";
150  }
151  else
152  {
154  if (!logPropagateQuiet())
155  m_args << "--quiet";
156  }
157  }
158 
159  // check for execute rights
160  if (!GetSetting("UseShell") && (access(command.toUtf8().constData(), X_OK)) != 0)
161  {
162  LOG(VB_GENERAL, LOG_ERR,
163  QString("MythSystemLegacy(%1) command not executable, ")
164  .arg(command) + ENO);
166  }
167 
168  m_logcmd = (m_command + " " + m_args.join(" ")).trimmed();
169 
170  if (GetSetting("AnonLog"))
171  {
172  m_logcmd.truncate(m_logcmd.indexOf(" "));
173  m_logcmd.append(" (anonymized)");
174  }
175 }
176 
177 // QBuffers may also need freeing
179 {
181  {
182  Term(true);
183  Wait();
184  }
185  d->DecrRef();
186 }
187 
188 void MythSystemLegacy::SetDirectory(const QString &directory)
189 {
190  m_settings["SetDirectory"] = true;
191  m_directory = QString(directory);
192 }
193 
195 {
196  if (!d || (GetStatus() != GENERIC_EXIT_START))
197  return false;
198 
199  m_nice = nice;
200  return true;
201 }
202 
204 {
205  if (!d || (GetStatus() != GENERIC_EXIT_START))
206  return false;
207 
208  m_ioprio = prio;
209  return true;
210 }
211 
213 void MythSystemLegacy::Run(std::chrono::seconds timeout)
214 {
215  if (!d)
217 
218  if (GetStatus() != GENERIC_EXIT_START)
219  {
220  emit error(GetStatus());
221  return;
222  }
223 
224  // Handle any locking of drawing, etc
225  HandlePreRun();
226 
227  d->Fork(timeout);
228 
230  {
231  m_semReady.acquire(1);
232  emit started();
233  d->Manage();
234  }
235  else
236  {
237  emit error(GetStatus());
238  }
239 }
240 
241 // should there be a separate 'getstatus' call? or is using
242 // Wait() for that purpose sufficient?
243 uint MythSystemLegacy::Wait(std::chrono::seconds timeout)
244 {
245  if (!d)
247 
248  if ((GetStatus() != GENERIC_EXIT_RUNNING) || GetSetting("RunInBackground"))
249  return GetStatus();
250 
251  if (GetSetting("ProcessEvents"))
252  {
253  auto tt = (timeout > 0s)
254  ? SystemClock::now() + timeout
255  : SystemTime::max();
256  while (SystemClock::now() < tt)
257  {
258  // loop until timeout hits or process ends
259  if (m_semReady.tryAcquire(1,100))
260  {
261  m_semReady.release(1);
262  break;
263  }
264 
265  qApp->processEvents();
266  }
267  }
268  else
269  {
270  if (timeout > 0s)
271  {
272  auto msec = duration_cast<std::chrono::milliseconds>(timeout);
273  if (m_semReady.tryAcquire(1, msec.count()))
274  m_semReady.release(1);
275  }
276  else
277  {
278  m_semReady.acquire(1);
279  m_semReady.release(1);
280  }
281  }
282  return GetStatus();
283 }
284 
286 {
287  if (!d)
289 
291  return;
292 
293  d->Term(force);
294 }
295 
297 {
298  if (!d)
300 
302  return;
303 
304 #ifndef SIGTRAP /* For Mingw */
305 #define SIGTRAP -1
306 #endif
307  int posix_signal = SIGTRAP;
308  switch (sig)
309  {
310  case kSignalNone:
311  case kSignalUnknown:
312  break;
313  case kSignalHangup: posix_signal = SIGHUP; break;
314  case kSignalInterrupt: posix_signal = SIGINT; break;
315  case kSignalContinue: posix_signal = SIGCONT; break;
316  case kSignalQuit: posix_signal = SIGQUIT; break;
317  case kSignalSegfault: posix_signal = SIGSEGV; break;
318  case kSignalKill: posix_signal = SIGKILL; break;
319  case kSignalUser1: posix_signal = SIGUSR1; break;
320  case kSignalUser2: posix_signal = SIGUSR2; break;
321  case kSignalTerm: posix_signal = SIGTERM; break;
322  case kSignalStop: posix_signal = SIGSTOP; break;
323  }
324 
325  // The default less switch above will cause a compiler warning
326  // if someone adds a signal without updating the switch, but in
327  // case that is missed print out a message.
328  if (SIGTRAP == posix_signal)
329  {
330  LOG(VB_SYSTEM, LOG_ERR,
331  QString("Programmer error: Unknown signal %1").arg(sig));
332  return;
333  }
334 
335  d->Signal(posix_signal);
336 }
337 
338 
340 {
342  {
343  LOG(VB_SYSTEM, LOG_DEBUG, QString("status: %1").arg(m_status));
344  return;
345  }
346 
348 
349  if (flags & kMSRunBackground)
350  m_settings["RunInBackground"] = true;
351 
352  if (m_command.endsWith("&"))
353  {
354  if (!GetSetting("RunInBackground"))
355  LOG(VB_SYSTEM, LOG_DEBUG, "Adding background flag");
356 
357  // Remove the &
358  m_command.chop(1);
359  m_command = m_command.trimmed();
360  m_settings["RunInBackground"] = true;
361  m_settings["UseShell"] = true;
362  m_settings["IsInUI"] = false;
363  }
364 
365  if (GetSetting("IsInUI"))
366  {
367  // Check for UI-only locks
368  m_settings["BlockInputDevs"] = ((flags & kMSDontBlockInputDevs) == 0U);
369  m_settings["DisableDrawing"] = ((flags & kMSDontDisableDrawing) == 0U);
370  m_settings["ProcessEvents"] = ((flags & kMSProcessEvents) != 0U);
371  m_settings["DisableUDP"] = ((flags & kMSDisableUDPListener) != 0U);
372  }
373 
374  if (flags & kMSStdIn)
375  m_settings["UseStdin"] = true;
376  if (flags & kMSStdOut)
377  m_settings["UseStdout"] = true;
378  if (flags & kMSStdErr)
379  m_settings["UseStderr"] = true;
380  if (flags & kMSRunShell)
381  m_settings["UseShell"] = true;
382  if (flags & kMSAutoCleanup && GetSetting("RunInBackground"))
383  m_settings["AutoCleanup"] = true;
384  if (flags & kMSAnonLog)
385  m_settings["AnonLog"] = true;
386  if (flags & kMSLowExitVal)
387  m_settings["OnlyLowExitVal"] = true;
388  if (flags & kMSPropagateLogs)
389  m_settings["PropagateLogs"] = true;
390 }
391 
392 QByteArray MythSystemLegacy::Read(int size)
393 {
394  return m_stdbuff[1].read(size);
395 }
396 
397 QByteArray MythSystemLegacy::ReadErr(int size)
398 {
399  return m_stdbuff[2].read(size);
400 }
401 
402 QByteArray& MythSystemLegacy::ReadAll(void)
403 {
404  return m_stdbuff[1].buffer();
405 }
406 
408 {
409  return m_stdbuff[2].buffer();
410 }
411 
416 int MythSystemLegacy::Write(const QByteArray &ba)
417 {
418  if (!GetSetting("UseStdin"))
419  return 0;
420 
421  return m_stdbuff[0].write(ba.constData());
422 }
423 
425 {
426  // This needs to be a send event so that the MythUI locks the input devices
427  // immediately instead of after existing events are processed
428  // since this function could be called inside one of those events.
429  if (GetSetting("BlockInputDevs"))
430  {
432  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
433  }
434 
435  // This needs to be a send event so that the listener is disabled
436  // immediately instead of after existing events are processed, since the
437  // listen server must be terminated before the spawned application tries
438  // to start its own
439  if (GetSetting("DisableUDP"))
440  {
442  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
443  }
444 
445  // This needs to be a send event so that the MythUI m_drawState change is
446  // flagged immediately instead of after existing events are processed
447  // since this function could be called inside one of those events.
448  if (GetSetting("DisableDrawing"))
449  {
451  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
452  }
453 }
454 
456 {
457  // Since this is *not* running in the UI thread (but rather the signal
458  // handler thread), we need to use postEvents
459  if (GetSetting("DisableDrawing"))
460  {
461  auto *event = new QEvent(MythEvent::kPopDisableDrawingEventType);
462  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
463  }
464 
465  // This needs to be a post event so we do not try to start listening on
466  // the UDP ports before the child application has stopped and terminated
467  if (GetSetting("DisableUDP"))
468  {
469  auto *event = new QEvent(MythEvent::kEnableUDPListenerEventType);
470  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
471  }
472 
473  // This needs to be a post event so that the MythUI unlocks input devices
474  // after all existing (blocked) events are processed and ignored.
475  if (GetSetting("BlockInputDevs"))
476  {
477  auto *event = new QEvent(MythEvent::kUnlockInputDevicesEventType);
478  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
479  }
480 }
481 
482 QString MythSystemLegacy::ShellEscape(const QString &in)
483 {
484  QString out = in;
485 
486  if (out.contains("\""))
487  out = out.replace("\"", "\\\"");
488 
489  if (out.contains("\'"))
490  out = out.replace("\'", "\\\'");
491 
492  if (out.contains(" "))
493  {
494  out.prepend("\"");
495  out.append("\"");
496  }
497 
498  return out;
499 }
500 
502  ReferenceCounter(debugName)
503 {
504 }
505 
506 uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
507 {
508  flags |= kMSRunShell | kMSAutoCleanup;
509  auto *ms = new MythSystemLegacy(command, flags);
510  ms->Run(timeout);
511  uint result = ms->Wait(0s);
512  if (!ms->GetSetting("RunInBackground"))
513  delete ms;
514 
515  return result;
516 }
517 
518 uint myth_system(const QString &Command, const QStringList& Args, uint Flags,
519  std::chrono::seconds Timeout)
520 {
521  Flags |= kMSRunShell | kMSAutoCleanup;
522  auto *ms = new MythSystemLegacy(Command, Args, Flags);
523  ms->Run(Timeout);
524  uint result = ms->Wait(0s);
525  if (!ms->GetSetting("RunInBackground"))
526  delete ms;
527 
528  return result;
529 }
530 
531 /*
532  * vim:ts=4:sw=4:ai:et:si:sts=4
533  */
kMSStdErr
@ kMSStdErr
allow access to stderr
Definition: mythsystem.h:42
kSignalNone
@ kSignalNone
Definition: mythsystem.h:57
build_compdb.args
args
Definition: build_compdb.py:11
mythevent.h
kSignalStop
@ kSignalStop
Definition: mythsystem.h:68
MythSystemLegacy::ReadAllErr
QByteArray & ReadAllErr()
Definition: mythsystemlegacy.cpp:407
MythEvent::kLockInputDevicesEventType
static Type kLockInputDevicesEventType
Definition: mythevent.h:86
ENO
#define ENO
This can be appended to the LOG args with "+".
Definition: mythlogging.h:72
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
MythSystemLegacy::ReadErr
QByteArray ReadErr(int size)
Definition: mythsystemlegacy.cpp:397
MythSystemLegacy::ProcessFlags
void ProcessFlags(uint flags)
Definition: mythsystemlegacy.cpp:339
MythSystemLegacy::m_settings
Setting m_settings
Definition: mythsystemlegacy.h:193
MythSystemLegacy::Term
void Term(bool force=false)
Definition: mythsystemlegacy.cpp:285
MythSystemLegacyUnix
Definition: mythsystemunix.h:92
ReferenceCounter::DecrRef
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
Definition: referencecounter.cpp:125
kMSDontBlockInputDevs
@ kMSDontBlockInputDevs
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:36
kMSAnonLog
@ kMSAnonLog
anonymize the logs
Definition: mythsystem.h:44
MythSystemLegacy
Definition: mythsystemlegacy.h:67
MythSystemLegacy::m_command
QString m_command
Definition: mythsystemlegacy.h:185
MythSystemLegacy::m_logcmd
QString m_logcmd
Definition: mythsystemlegacy.h:186
MythSystemLegacy::GetStatus
uint GetStatus(void) const
Definition: mythsystemlegacy.h:122
MythEvent::kPushDisableDrawingEventType
static Type kPushDisableDrawingEventType
Definition: mythevent.h:84
MythSystemLegacyPrivate::MythSystemLegacyPrivate
MythSystemLegacyPrivate(const QString &debugName)
Definition: mythsystemlegacy.cpp:501
kSignalQuit
@ kSignalQuit
Definition: mythsystem.h:62
MythEvent::kPopDisableDrawingEventType
static Type kPopDisableDrawingEventType
Definition: mythevent.h:85
MythSystemLegacyPrivate::Term
virtual void Term(bool force=false)=0
MythSystemLegacy::SetIOPrio
bool SetIOPrio(int prio)
Definition: mythsystemlegacy.cpp:203
MythCoreContext::GetGUIObject
QObject * GetGUIObject(void)
Definition: mythcorecontext.cpp:1753
MythCoreContext::IsUIThread
bool IsUIThread(void)
Definition: mythcorecontext.cpp:1352
SIGCONT
#define SIGCONT
Definition: compat.h:139
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythSystemLegacy::ReadAll
QByteArray & ReadAll()
Definition: mythsystemlegacy.cpp:402
force
bool force
Definition: mythcommflag.cpp:70
GENERIC_EXIT_INVALID_CMDLINE
#define GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
Definition: exitcodes.h:15
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
SIGQUIT
#define SIGQUIT
Definition: compat.h:133
MythSystemLegacyPrivate::ParseShell
virtual bool ParseShell(const QString &cmd, QString &abscmd, QStringList &args)=0
GENERIC_EXIT_NO_HANDLER
#define GENERIC_EXIT_NO_HANDLER
No MythSystemLegacy Handler.
Definition: exitcodes.h:27
MythSystemLegacy::SetCommand
void SetCommand(const QString &command, uint flags)
Resets an existing MythSystemLegacy object to a new command.
Definition: mythsystemlegacy.cpp:88
mythsystemlegacy.h
MythSystemLegacy::Signal
void Signal(MythSignal sig)
Definition: mythsystemlegacy.cpp:296
Command
Definition: gamesettings.cpp:233
mythlogging.h
MythSystemLegacy::m_directory
QString m_directory
Definition: mythsystemlegacy.h:188
MythSystemLegacy::~MythSystemLegacy
~MythSystemLegacy(void) override
Definition: mythsystemlegacy.cpp:178
MythSystemLegacy::error
void error(uint status)
compat.h
SIGSTOP
#define SIGSTOP
Definition: compat.h:140
MythSystemLegacy::ShellEscape
static QString ShellEscape(const QString &in)
Definition: mythsystemlegacy.cpp:482
SIGUSR1
#define SIGUSR1
Definition: compat.h:135
MythSystemLegacy::GetSetting
bool GetSetting(const char *setting)
Definition: mythsystemlegacy.h:134
SIGHUP
#define SIGHUP
Definition: compat.h:132
MythSystemLegacy::Wait
uint Wait(std::chrono::seconds timeout=0s)
Definition: mythsystemlegacy.cpp:243
MythSystemLegacyPrivate::Signal
virtual void Signal(int sig)=0
GENERIC_EXIT_CMD_NOT_FOUND
#define GENERIC_EXIT_CMD_NOT_FOUND
Command not found.
Definition: exitcodes.h:12
kSignalUnknown
@ kSignalUnknown
Definition: mythsystem.h:58
MythSystemLegacy::SetDirectory
void SetDirectory(const QString &directory)
Definition: mythsystemlegacy.cpp:188
kSignalContinue
@ kSignalContinue
Definition: mythsystem.h:61
MythEvent::kDisableUDPListenerEventType
static Type kDisableUDPListenerEventType
Definition: mythevent.h:89
MythSystemLegacy::m_ioprio
int m_ioprio
Definition: mythsystemlegacy.h:191
kMSPropagateLogs
@ kMSPropagateLogs
add arguments for MythTV log propagation
Definition: mythsystem.h:52
MythSystemLegacy::m_stdbuff
std::array< QBuffer, 3 > m_stdbuff
Definition: mythsystemlegacy.h:194
uint
unsigned int uint
Definition: compat.h:79
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:59
SIGKILL
#define SIGKILL
Definition: compat.h:134
MythSystemLegacy::started
void started(void)
referencecounter.h
kMSRunShell
@ kMSRunShell
run process through shell
Definition: mythsystem.h:43
kMSAutoCleanup
@ kMSAutoCleanup
automatically delete if backgrounded
Definition: mythsystem.h:45
kMSRunBackground
@ kMSRunBackground
run child in the background
Definition: mythsystem.h:38
kSignalInterrupt
@ kSignalInterrupt
Definition: mythsystem.h:60
MythSystemLegacy::MythSystemLegacy
MythSystemLegacy(QObject *parent=nullptr)
Definition: mythsystemlegacy.cpp:67
kMSDisableUDPListener
@ kMSDisableUDPListener
disable MythMessage UDP listener for the duration of application.
Definition: mythsystem.h:50
kSignalUser1
@ kSignalUser1
Definition: mythsystem.h:65
mythsystemwindows.h
MythEvent::kUnlockInputDevicesEventType
static Type kUnlockInputDevicesEventType
Definition: mythevent.h:87
kSignalKill
@ kSignalKill
Definition: mythsystem.h:64
MythSystemLegacy::m_semReady
QSemaphore m_semReady
Definition: mythsystemlegacy.h:183
mythcorecontext.h
MythSystemLegacy::HandlePreRun
void HandlePreRun(void)
Definition: mythsystemlegacy.cpp:424
kMSProcessEvents
@ kMSProcessEvents
process events while waiting
Definition: mythsystem.h:39
MythSystemLegacyPrivate::Fork
virtual void Fork(std::chrono::seconds timeout)=0
MythSystemLegacyWindows
Definition: mythsystemwindows.h:87
SIGTRAP
#define SIGTRAP
MythSystemLegacy::Write
int Write(const QByteArray &ba)
This writes to the standard input of the program being run.
Definition: mythsystemlegacy.cpp:416
SIGUSR2
#define SIGUSR2
Definition: compat.h:136
kMSLowExitVal
@ kMSLowExitVal
allow exit values 0-127 only
Definition: mythsystem.h:47
logPropagateArgList
QStringList logPropagateArgList
Definition: logging.cpp:87
GENERIC_EXIT_START
#define GENERIC_EXIT_START
MythSystemLegacy process starting.
Definition: exitcodes.h:35
MythSignal
MythSignal
Definition: mythsystem.h:56
MythSystemLegacy::SetNice
bool SetNice(int nice)
Definition: mythsystemlegacy.cpp:194
logPropagateQuiet
bool logPropagateQuiet(void)
Check if we are propagating a "--quiet".
Definition: logging.cpp:663
nice
#define nice(x)
Definition: compat.h:120
mythsystemunix.h
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:86
MythSystemLegacy::Run
void Run(std::chrono::seconds timeout=0s)
Runs a command inside the /bin/sh shell. Returns immediately.
Definition: mythsystemlegacy.cpp:213
MythCoreContext::HasGUI
bool HasGUI(void) const
Definition: mythcorecontext.cpp:1748
GENERIC_EXIT_RUNNING
#define GENERIC_EXIT_RUNNING
Process is running.
Definition: exitcodes.h:25
kMSDontDisableDrawing
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:37
MythSystemLegacy::m_status
uint m_status
Definition: mythsystemlegacy.h:182
MythSystemLegacy::HandlePostRun
void HandlePostRun(void)
Definition: mythsystemlegacy.cpp:455
kSignalHangup
@ kSignalHangup
Definition: mythsystem.h:59
kMSStdIn
@ kMSStdIn
allow access to stdin
Definition: mythsystem.h:40
kSignalUser2
@ kSignalUser2
Definition: mythsystem.h:66
kSignalTerm
@ kSignalTerm
Definition: mythsystem.h:67
kMSStdOut
@ kMSStdOut
allow access to stdout
Definition: mythsystem.h:41
MythSystemLegacy::Read
QByteArray Read(int size)
Definition: mythsystemlegacy.cpp:392
MythSystemLegacy::d
MythSystemLegacyPrivate * d
Definition: mythsystemlegacy.h:176
MythSystemLegacy::m_nice
int m_nice
Definition: mythsystemlegacy.h:190
MythSystemLegacy::m_args
QStringList m_args
Definition: mythsystemlegacy.h:187
MythSystemLegacyPrivate::Manage
virtual void Manage(void)=0
ReferenceCounter
General purpose reference counter.
Definition: referencecounter.h:26
kSignalSegfault
@ kSignalSegfault
Definition: mythsystem.h:63
MythSystemLegacy::initializePrivate
void initializePrivate(void)
Definition: mythsystemlegacy.cpp:58
MythEvent::kEnableUDPListenerEventType
static Type kEnableUDPListenerEventType
Definition: mythevent.h:90