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