Index: libs/libmyth/util.cpp
===================================================================
--- libs/libmyth/util.cpp	(revision 15129)
+++ libs/libmyth/util.cpp	(working copy)
@@ -318,6 +318,19 @@
 }
 #endif
 
+/** \fn isRunning(QString program)
+ *  \brief Returns boolean true/false depending on whether program is running.
+ */
+bool isRunning(QString program)
+{
+    QString sCommand = QString("ret=`ps cax | grep -c %1`; exit $ret").arg(program);
+    int res = myth_system(sCommand.ascii());
+    if (WIFEXITED(res))
+        res = WEXITSTATUS(res);
+
+    return res;
+}
+
 /** \fn cutDownString(const QString&, QFont*, uint)
  *  \brief Returns a string based on "text" that fits within "maxwidth" pixels.
  */
Index: libs/libmyth/util.h
===================================================================
--- libs/libmyth/util.h	(revision 15129)
+++ libs/libmyth/util.h	(working copy)
@@ -53,6 +53,7 @@
 MPUBLIC QRgb blendColors(QRgb source, QRgb add, int alpha);
 
 MPUBLIC uint myth_system(const QString &command, int flags = 0);
+MPUBLIC bool isRunning(QString program);
 
 MPUBLIC QString cutDownString(const QString &text, QFont *testFont, uint maxwidth);
 
Index: programs/mythshutdown/main.cpp
===================================================================
--- programs/mythshutdown/main.cpp	(revision 15129)
+++ programs/mythshutdown/main.cpp	(working copy)
@@ -14,6 +14,7 @@
 #include "libmythtv/jobqueue.h"
 #include "tv.h"
 #include "compat.h"
+#include "util.h"
 
 void setGlobalSetting(const QString &key, const QString &value)
 {
@@ -100,16 +101,6 @@
     return 0;
 }
 
-bool isRunning(QString program)
-{
-    QString sCommand = QString("ret=`ps cax | grep -c %1`; exit $ret").arg(program);
-    int res = system(sCommand.ascii());
-    if (WIFEXITED(res))
-        res = WEXITSTATUS(res);
-
-    return res;
-}
-
 QDateTime getDailyWakeupTime(QString sPeriod)
 {
     QString sTime = getGlobalSetting(sPeriod, "00:00");
