From 6c6071f30bf0711cd3ed7a35d39537e5f17392e1 Mon Sep 17 00:00:00 2001 From: HanzZ Date: Mon, 7 Nov 2011 19:00:40 +0100 Subject: [PATCH] set RLIMIT_CORE --- spectrum/src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp index 8074d354..565aaaeb 100644 --- a/spectrum/src/main.cpp +++ b/spectrum/src/main.cpp @@ -140,6 +140,7 @@ int main(int argc, char **argv) desc.add_options() ("help,h", "help") ("no-daemonize,n", "Do not run spectrum as daemon") + ("no-debug,d", "Create coredumps on crash") ("jid,j", boost::program_options::value(&jid)->default_value(""), "Specify JID of transport manually") ("config", boost::program_options::value(&config_file)->default_value(""), "Config file") ; @@ -268,6 +269,11 @@ int main(int argc, char **argv) } setrlimit(RLIMIT_CORE, &limit); } + + struct rlimit limit; + limit.rlim_max = RLIM_INFINITY; + limit.rlim_cur = RLIM_INFINITY; + setrlimit(RLIMIT_CORE, &limit); #endif Swift::SimpleEventLoop eventLoop;