diff --git a/mythtv/programs/mythbackend/main.cpp b/mythtv/programs/mythbackend/main.cpp
index cb2cbcc..8d24ebc 100644
--- a/mythtv/programs/mythbackend/main.cpp
+++ b/mythtv/programs/mythbackend/main.cpp
@@ -1,3 +1,8 @@
+#include "mythconfig.h"
+#if HAVE_SETRLIMIT
+#include <sys/resource.h>
+#endif
+
 #ifndef _WIN32
 #include <QCoreApplication>
 #else
@@ -54,6 +59,12 @@ static void qt_exit(int)
 
 int main(int argc, char **argv)
 {
+#if HAVE_SETRLIMIT
+    // enable a core dump file
+    struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
+    setrlimit(RLIMIT_CORE, &rl);
+#endif
+
     MythBackendCommandLineParser cmdline;
     if (!cmdline.Parse(argc, argv))
     {
diff --git a/mythtv/programs/mythfrontend/main.cpp b/mythtv/programs/mythfrontend/main.cpp
index 5a6967a..899c014 100644
--- a/mythtv/programs/mythfrontend/main.cpp
+++ b/mythtv/programs/mythfrontend/main.cpp
@@ -3,6 +3,11 @@
 #include <signal.h>
 #include <cerrno>
 
+#include "mythconfig.h"
+#if HAVE_SETRLIMIT
+#include <sys/resource.h>
+#endif
+
 #include <iostream>
 using namespace std;
 
@@ -18,7 +23,6 @@ using namespace std;
 #include <QTimer>
 
 #include "previewgeneratorqueue.h"
-#include "mythconfig.h"
 #include "tv.h"
 #include "proglist.h"
 #include "progfind.h"
@@ -1436,6 +1440,12 @@ int main(int argc, char **argv)
     bool bPromptForBackend    = false;
     bool bBypassAutoDiscovery = false;
 
+#if HAVE_SETRLIMIT
+    // enable a core dump file
+    struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
+    setrlimit(RLIMIT_CORE, &rl);
+#endif
+
     MythFrontendCommandLineParser cmdline;
     if (!cmdline.Parse(argc, argv))
     {
