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 <QCoreApplication>
39 
40 // libmythbase headers
41 #include "referencecounter.h"
42 #include "mythcorecontext.h"
43 #include "mythevent.h"
44 #include "mythlogging.h"
45 
46 #if CONFIG_CYGWIN || defined(_WIN32)
47 #include "mythsystemwindows.h"
48 #else
49 #include "mythsystemunix.h"
50 #endif
51 
52 
53 /*******************************
54  * MythSystemLegacy method defines
55  ******************************/
56 
58 {
59 #if CONFIG_CYGWIN || defined(_WIN32)
60  d = new MythSystemLegacyWindows(this);
61 #else
62  d = new MythSystemLegacyUnix(this);
63 #endif
64 }
65 
67  QObject(parent)
68 {
69  setObjectName("MythSystemLegacy()");
70  m_semReady.release(1); // initialize
72 }
73 
74 MythSystemLegacy::MythSystemLegacy(const QString &command, uint flags,
75  QObject *parent) :
76  QObject(parent)
77 {
78  setObjectName(QString("MythSystemLegacy(%1)").arg(command));
79  m_semReady.release(1); // initialize
81  SetCommand(command, flags);
82 }
83 
87 void MythSystemLegacy::SetCommand(const QString &command, uint flags)
88 {
89  if (flags & kMSRunShell)
90  {
91  SetCommand(command, QStringList(), flags);
92  }
93  else
94  {
95  QString abscommand;
96  QStringList args;
97  if (!d->ParseShell(command, abscommand, args))
98  {
99  LOG(VB_GENERAL, LOG_ERR,
100  QString("MythSystemLegacy(%1) command not understood")
101  .arg(command));
103  return;
104  }
105 
106  SetCommand(abscommand, args, flags);
107  }
108 
109  if (m_settings["UseStdin"])
110  m_stdbuff[0].open(QIODevice::WriteOnly);
111  if (m_settings["UseStdout"])
112  m_stdbuff[1].open(QIODevice::ReadOnly);
113  if (m_settings["UseStderr"])
114  m_stdbuff[2].open(QIODevice::ReadOnly);
115 }
116 
117 
118 MythSystemLegacy::MythSystemLegacy(const QString &command,
119  const QStringList &args,
120  uint flags,
121  QObject *parent) :
122  QObject(parent)
123 {
124  m_semReady.release(1); // initialize
126  SetCommand(command, args, flags);
127 }
128 
132 void MythSystemLegacy::SetCommand(const QString &command,
133  const QStringList &args, uint flags)
134 {
136  m_command = QString(command).trimmed();
137  m_args = QStringList(args);
138 
139  ProcessFlags(flags);
140 
141  // add logging arguments
142  if (GetSetting("PropagateLogs"))
143  {
144  if (GetSetting("UseShell") && m_args.isEmpty())
145  {
147  if (!logPropagateQuiet())
148  m_command += " --quiet";
149  }
150  else
151  {
153  if (!logPropagateQuiet())
154  m_args << "--quiet";
155  }
156  }
157 
158  // check for execute rights
159  if (!GetSetting("UseShell") && (access(command.toUtf8().constData(), X_OK)) != 0)
160  {
161  LOG(VB_GENERAL, LOG_ERR,
162  QString("MythSystemLegacy(%1) command not executable, ")
163  .arg(command) + ENO);
165  }
166 
167  m_logcmd = (m_command + " " + m_args.join(" ")).trimmed();
168 
169  if (GetSetting("AnonLog"))
170  {
171  m_logcmd.truncate(m_logcmd.indexOf(" "));
172  m_logcmd.append(" (anonymized)");
173  }
174 }
175 
176 // QBuffers may also need freeing
178 {
180  {
181  Term(true);
182  Wait();
183  }
184  d->DecrRef();
185 }
186 
187 void MythSystemLegacy::SetDirectory(const QString &directory)
188 {
189  m_settings["SetDirectory"] = true;
190  m_directory = QString(directory);
191 }
192 
194 {
195  if (!d || (GetStatus() != GENERIC_EXIT_START))
196  return false;
197 
198  m_nice = nice;
199  return true;
200 }
201 
203 {
204  if (!d || (GetStatus() != GENERIC_EXIT_START))
205  return false;
206 
207  m_ioprio = prio;
208  return true;
209 }
210 
212 void MythSystemLegacy::Run(std::chrono::seconds timeout)
213 {
214  if (!d)
216 
217  if (GetStatus() != GENERIC_EXIT_START)
218  {
219  emit error(GetStatus());
220  return;
221  }
222 
223  // Handle any locking of drawing, etc
224  HandlePreRun();
225 
226  d->Fork(timeout);
227 
229  {
230  m_semReady.acquire(1);
231  emit started();
232  d->Manage();
233  }
234  else
235  {
236  emit error(GetStatus());
237  }
238 }
239 
240 // should there be a separate 'getstatus' call? or is using
241 // Wait() for that purpose sufficient?
242 uint MythSystemLegacy::Wait(std::chrono::seconds timeout)
243 {
244  if (!d)
246 
247  if ((GetStatus() != GENERIC_EXIT_RUNNING) || GetSetting("RunInBackground"))
248  return GetStatus();
249 
250  if (GetSetting("ProcessEvents"))
251  {
252  auto tt = (timeout > 0s)
253  ? SystemClock::now() + timeout
254  : SystemTime::max();
255  while (SystemClock::now() < tt)
256  {
257  // loop until timeout hits or process ends
258  if (m_semReady.tryAcquire(1,100))
259  {
260  m_semReady.release(1);
261  break;
262  }
263 
264  qApp->processEvents();
265  }
266  }
267  else
268  {
269  if (timeout > 0s)
270  {
271  auto msec = duration_cast<std::chrono::milliseconds>(timeout);
272  if (m_semReady.tryAcquire(1, msec.count()))
273  m_semReady.release(1);
274  }
275  else
276  {
277  m_semReady.acquire(1);
278  m_semReady.release(1);
279  }
280  }
281  return GetStatus();
282 }
283 
285 {
286  if (!d)
288 
290  return;
291 
292  d->Term(force);
293 }
294 
296 {
297  if (!d)
299 
301  return;
302 
303  int posix_signal = SIGTRAP;
304  switch (sig)
305  {
306  case kSignalNone:
307  case kSignalUnknown:
308  break;
309  case kSignalHangup: posix_signal = SIGHUP; break;
310  case kSignalInterrupt: posix_signal = SIGINT; break;
311  case kSignalContinue: posix_signal = SIGCONT; break;
312  case kSignalQuit: posix_signal = SIGQUIT; break;
313  case kSignalSegfault: posix_signal = SIGSEGV; break;
314  case kSignalKill: posix_signal = SIGKILL; break;
315  case kSignalUser1: posix_signal = SIGUSR1; break;
316  case kSignalUser2: posix_signal = SIGUSR2; break;
317  case kSignalTerm: posix_signal = SIGTERM; break;
318  case kSignalStop: posix_signal = SIGSTOP; break;
319  }
320 
321  // The default less switch above will cause a compiler warning
322  // if someone adds a signal without updating the switch, but in
323  // case that is missed print out a message.
324  if (SIGTRAP == posix_signal)
325  {
326  LOG(VB_SYSTEM, LOG_ERR,
327  QString("Programmer error: Unknown signal %1").arg(sig));
328  return;
329  }
330 
331  d->Signal(posix_signal);
332 }
333 
334 
336 {
338  {
339  LOG(VB_SYSTEM, LOG_DEBUG, QString("status: %1").arg(m_status));
340  return;
341  }
342 
344 
345  if (flags & kMSRunBackground)
346  m_settings["RunInBackground"] = true;
347 
348  if (m_command.endsWith("&"))
349  {
350  if (!GetSetting("RunInBackground"))
351  LOG(VB_SYSTEM, LOG_DEBUG, "Adding background flag");
352 
353  // Remove the &
354  m_command.chop(1);
355  m_command = m_command.trimmed();
356  m_settings["RunInBackground"] = true;
357  m_settings["UseShell"] = true;
358  m_settings["IsInUI"] = false;
359  }
360 
361  if (GetSetting("IsInUI"))
362  {
363  // Check for UI-only locks
364  m_settings["BlockInputDevs"] = ((flags & kMSDontBlockInputDevs) == 0U);
365  m_settings["DisableDrawing"] = ((flags & kMSDontDisableDrawing) == 0U);
366  m_settings["ProcessEvents"] = ((flags & kMSProcessEvents) != 0U);
367  m_settings["DisableUDP"] = ((flags & kMSDisableUDPListener) != 0U);
368  }
369 
370  if (flags & kMSStdIn)
371  m_settings["UseStdin"] = true;
372  if (flags & kMSStdOut)
373  m_settings["UseStdout"] = true;
374  if (flags & kMSStdErr)
375  m_settings["UseStderr"] = true;
376  if (flags & kMSRunShell)
377  m_settings["UseShell"] = true;
378  if (flags & kMSAutoCleanup && GetSetting("RunInBackground"))
379  m_settings["AutoCleanup"] = true;
380  if (flags & kMSAnonLog)
381  m_settings["AnonLog"] = true;
382  if (flags & kMSLowExitVal)
383  m_settings["OnlyLowExitVal"] = true;
384  if (flags & kMSPropagateLogs)
385  m_settings["PropagateLogs"] = true;
386 }
387 
388 QByteArray MythSystemLegacy::Read(int size)
389 {
390  return m_stdbuff[1].read(size);
391 }
392 
393 QByteArray MythSystemLegacy::ReadErr(int size)
394 {
395  return m_stdbuff[2].read(size);
396 }
397 
398 QByteArray& MythSystemLegacy::ReadAll(void)
399 {
400  return m_stdbuff[1].buffer();
401 }
402 
404 {
405  return m_stdbuff[2].buffer();
406 }
407 
412 int MythSystemLegacy::Write(const QByteArray &ba)
413 {
414  if (!GetSetting("UseStdin"))
415  return 0;
416 
417  return m_stdbuff[0].write(ba.constData());
418 }
419 
421 {
422  // This needs to be a send event so that the MythUI locks the input devices
423  // immediately instead of after existing events are processed
424  // since this function could be called inside one of those events.
425  if (GetSetting("BlockInputDevs"))
426  {
428  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
429  }
430 
431  // This needs to be a send event so that the listener is disabled
432  // immediately instead of after existing events are processed, since the
433  // listen server must be terminated before the spawned application tries
434  // to start its own
435  if (GetSetting("DisableUDP"))
436  {
438  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
439  }
440 
441  // This needs to be a send event so that the MythUI m_drawState change is
442  // flagged immediately instead of after existing events are processed
443  // since this function could be called inside one of those events.
444  if (GetSetting("DisableDrawing"))
445  {
447  QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
448  }
449 }
450 
452 {
453  // Since this is *not* running in the UI thread (but rather the signal
454  // handler thread), we need to use postEvents
455  if (GetSetting("DisableDrawing"))
456  {
457  auto *event = new QEvent(MythEvent::kPopDisableDrawingEventType);
458  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
459  }
460 
461  // This needs to be a post event so we do not try to start listening on
462  // the UDP ports before the child application has stopped and terminated
463  if (GetSetting("DisableUDP"))
464  {
465  auto *event = new QEvent(MythEvent::kEnableUDPListenerEventType);
466  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
467  }
468 
469  // This needs to be a post event so that the MythUI unlocks input devices
470  // after all existing (blocked) events are processed and ignored.
471  if (GetSetting("BlockInputDevs"))
472  {
473  auto *event = new QEvent(MythEvent::kUnlockInputDevicesEventType);
474  QCoreApplication::postEvent(gCoreContext->GetGUIObject(), event);
475  }
476 }
477 
478 QString MythSystemLegacy::ShellEscape(const QString &in)
479 {
480  QString out = in;
481 
482  if (out.contains("\""))
483  out = out.replace("\"", "\\\"");
484 
485  if (out.contains("\'"))
486  out = out.replace("\'", "\\\'");
487 
488  if (out.contains(" "))
489  {
490  out.prepend("\"");
491  out.append("\"");
492  }
493 
494  return out;
495 }
496 
498  ReferenceCounter(debugName)
499 {
500 }
501 
502 uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
503 {
504  flags |= kMSRunShell | kMSAutoCleanup;
505  auto *ms = new MythSystemLegacy(command, flags);
506  ms->Run(timeout);
507  uint result = ms->Wait(0s);
508  if (!ms->GetSetting("RunInBackground"))
509  delete ms;
510 
511  return result;
512 }
513 
514 uint myth_system(const QString &Command, const QStringList& Args, uint Flags,
515  std::chrono::seconds Timeout)
516 {
517  Flags |= kMSRunShell | kMSAutoCleanup;
518  auto *ms = new MythSystemLegacy(Command, Args, Flags);
519  ms->Run(Timeout);
520  uint result = ms->Wait(0s);
521  if (!ms->GetSetting("RunInBackground"))
522  delete ms;
523 
524  return result;
525 }
526 
527 /*
528  * vim:ts=4:sw=4:ai:et:si:sts=4
529  */
force
bool force
Definition: mythtv/programs/mythcommflag/main.cpp:72
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:403
MythEvent::kLockInputDevicesEventType
static Type kLockInputDevicesEventType
Definition: mythevent.h:85
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:393
MythSystemLegacy::ProcessFlags
void ProcessFlags(uint flags)
Definition: mythsystemlegacy.cpp:335
MythSystemLegacy::m_settings
Setting m_settings
Definition: mythsystemlegacy.h:193
MythSystemLegacy::Term
void Term(bool force=false)
Definition: mythsystemlegacy.cpp:284
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:83
MythSystemLegacyPrivate::MythSystemLegacyPrivate
MythSystemLegacyPrivate(const QString &debugName)
Definition: mythsystemlegacy.cpp:497
kSignalQuit
@ kSignalQuit
Definition: mythsystem.h:62
MythEvent::kPopDisableDrawingEventType
static Type kPopDisableDrawingEventType
Definition: mythevent.h:84
MythSystemLegacyPrivate::Term
virtual void Term(bool force=false)=0
MythSystemLegacy::SetIOPrio
bool SetIOPrio(int prio)
Definition: mythsystemlegacy.cpp:202
MythCoreContext::GetGUIObject
QObject * GetGUIObject(void)
Definition: mythcorecontext.cpp:1761
MythCoreContext::IsUIThread
bool IsUIThread(void)
Definition: mythcorecontext.cpp:1360
SIGCONT
#define SIGCONT
Definition: compat.h:221
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythSystemLegacy::ReadAll
QByteArray & ReadAll()
Definition: mythsystemlegacy.cpp:398
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:502
SIGQUIT
#define SIGQUIT
Definition: compat.h:215
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:87
mythsystemlegacy.h
MythSystemLegacy::Signal
void Signal(MythSignal sig)
Definition: mythsystemlegacy.cpp:295
Command
Definition: gamesettings.cpp:227
mythlogging.h
MythSystemLegacy::m_directory
QString m_directory
Definition: mythsystemlegacy.h:188
MythSystemLegacy::~MythSystemLegacy
~MythSystemLegacy(void) override
Definition: mythsystemlegacy.cpp:177
MythSystemLegacy::error
void error(uint status)
compat.h
SIGSTOP
#define SIGSTOP
Definition: compat.h:222
MythSystemLegacy::ShellEscape
static QString ShellEscape(const QString &in)
Definition: mythsystemlegacy.cpp:478
SIGUSR1
#define SIGUSR1
Definition: compat.h:217
MythSystemLegacy::GetSetting
bool GetSetting(const char *setting)
Definition: mythsystemlegacy.h:134
SIGHUP
#define SIGHUP
Definition: compat.h:214
MythSystemLegacy::Wait
uint Wait(std::chrono::seconds timeout=0s)
Definition: mythsystemlegacy.cpp:242
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:187
kSignalContinue
@ kSignalContinue
Definition: mythsystem.h:61
MythEvent::kDisableUDPListenerEventType
static Type kDisableUDPListenerEventType
Definition: mythevent.h:88
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:140
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
SIGKILL
#define SIGKILL
Definition: compat.h:216
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:66
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:86
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:420
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
MythSystemLegacy::Write
int Write(const QByteArray &ba)
This writes to the standard input of the program being run.
Definition: mythsystemlegacy.cpp:412
SIGUSR2
#define SIGUSR2
Definition: compat.h:218
kMSLowExitVal
@ kMSLowExitVal
allow exit values 0-127 only
Definition: mythsystem.h:47
logPropagateArgList
QStringList logPropagateArgList
Definition: logging.cpp:86
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:193
logPropagateQuiet
bool logPropagateQuiet(void)
Check if we are propagating a "--quiet".
Definition: logging.cpp:660
nice
#define nice(x)
Definition: compat.h:196
mythsystemunix.h
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:85
MythSystemLegacy::Run
void Run(std::chrono::seconds timeout=0s)
Runs a command inside the /bin/sh shell. Returns immediately.
Definition: mythsystemlegacy.cpp:212
MythCoreContext::HasGUI
bool HasGUI(void) const
Definition: mythcorecontext.cpp:1756
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:451
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:388
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:57
MythEvent::kEnableUDPListenerEventType
static Type kEnableUDPListenerEventType
Definition: mythevent.h:89