Blame SOURCES/make-3.82-func_shell-rlimit.patch

71dafe
From 552207b506f4d98a6a5f73053aa6bd924758708f Mon Sep 17 00:00:00 2001
71dafe
From: Petr Machata <pmachata@redhat.com>
71dafe
Date: Thu, 22 Aug 2013 16:46:17 +0200
71dafe
Subject: [PATCH] Get rid of stack size limit for processes spawned via
71dafe
 $(shell)
71dafe
71dafe
---
71dafe
 ChangeLog  |    5 +++++
71dafe
 function.c |   10 +++++++++-
71dafe
 2 files changed, 14 insertions(+), 1 deletions(-)
71dafe
71dafe
diff --git a/function.c b/function.c
71dafe
index 9eabd73..e121b9a 100644
71dafe
--- a/function.c
71dafe
+++ b/function.c
71dafe
@@ -1715,7 +1715,15 @@ func_shell_base (char *o, char **argv, int trim_newlines)
71dafe
   if (pid < 0)
71dafe
     perror_with_name (error_prefix, "fork");
71dafe
   else if (pid == 0)
71dafe
-    child_execute_job (0, pipedes[1], command_argv, envp);
71dafe
+    {
71dafe
+#ifdef SET_STACK_SIZE
71dafe
+      /* Reset limits, if necessary.  */
71dafe
+      if (stack_limit.rlim_cur)
71dafe
+	setrlimit (RLIMIT_STACK, &stack_limit);
71dafe
+#endif
71dafe
+
71dafe
+      child_execute_job (0, pipedes[1], command_argv, envp);
71dafe
+    }
71dafe
   else
71dafe
 # endif
71dafe
 #endif
71dafe
-- 
71dafe
1.7.6.5
71dafe