Ticket #10179: coredump.patch

File coredump.patch, 1.6 KB (added by Lawrence Rust <lvr@…>, 8 years ago)
  • mythtv/programs/mythbackend/main.cpp

    diff --git a/mythtv/programs/mythbackend/main.cpp b/mythtv/programs/mythbackend/main.cpp
    index cb2cbcc..8d24ebc 100644
    a b  
     1#include "mythconfig.h"
     2#if HAVE_SETRLIMIT
     3#include <sys/resource.h>
     4#endif
     5
    16#ifndef _WIN32
    27#include <QCoreApplication>
    38#else
    static void qt_exit(int) 
    5459
    5560int main(int argc, char **argv)
    5661{
     62#if HAVE_SETRLIMIT
     63    // enable a core dump file
     64    struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
     65    setrlimit(RLIMIT_CORE, &rl);
     66#endif
     67
    5768    MythBackendCommandLineParser cmdline;
    5869    if (!cmdline.Parse(argc, argv))
    5970    {
  • mythtv/programs/mythfrontend/main.cpp

    diff --git a/mythtv/programs/mythfrontend/main.cpp b/mythtv/programs/mythfrontend/main.cpp
    index 5a6967a..899c014 100644
    a b  
    33#include <signal.h>
    44#include <cerrno>
    55
     6#include "mythconfig.h"
     7#if HAVE_SETRLIMIT
     8#include <sys/resource.h>
     9#endif
     10
    611#include <iostream>
    712using namespace std;
    813
    using namespace std; 
    1823#include <QTimer>
    1924
    2025#include "previewgeneratorqueue.h"
    21 #include "mythconfig.h"
    2226#include "tv.h"
    2327#include "proglist.h"
    2428#include "progfind.h"
    int main(int argc, char **argv) 
    14361440    bool bPromptForBackend    = false;
    14371441    bool bBypassAutoDiscovery = false;
    14381442
     1443#if HAVE_SETRLIMIT
     1444    // enable a core dump file
     1445    struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
     1446    setrlimit(RLIMIT_CORE, &rl);
     1447#endif
     1448
    14391449    MythFrontendCommandLineParser cmdline;
    14401450    if (!cmdline.Parse(argc, argv))
    14411451    {