From c3aa1a61e65fddecd48ea7d5456e41afcd6e8a96 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Mon, 24 Sep 2012 13:20:02 +0000 Subject: [PATCH] Minix does not have setrlimit(). --- ede-launch/ede-launch.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ede-launch/ede-launch.cpp b/ede-launch/ede-launch.cpp index 28019e5..7bdc1aa 100644 --- a/ede-launch/ede-launch.cpp +++ b/ede-launch/ede-launch.cpp @@ -277,6 +277,11 @@ static int start_child_process(const char* cmd) { } static int start_child_process_with_core(const char* cmd) { +#ifndef __minix + /* + * Minix does not have setrlimit() so we disable everything as by default it + * will dump core. + */ struct rlimit r; errno = 0; @@ -292,14 +297,16 @@ static int start_child_process_with_core(const char* cmd) { E_WARNING(E_STRLOC ": setrlimit() failed with '%s'\n", strerror(errno)); return -1; } - +#endif int ret = start_child_process(cmd); +#ifndef __minix r.rlim_cur = old; if(setrlimit(RLIMIT_CORE, &r) == -1) { E_WARNING(E_STRLOC ": setrlimit() failed with '%s'\n", strerror(errno)); return -1; } +#endif return ret; }