]> git.pld-linux.org Git - packages/glibc.git/commitdiff
Patch from RH:
authorkloczek <kloczek@pld-linux.org>
Fri, 8 Nov 2002 01:36:49 +0000 (01:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
2002-09-28  Roland McGrath  <roland@redhat.com>

        * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
        Don't call setrlimit, since we did no prior bogon we need to undo.

Changed files:
    glibc-setrlimit.patch -> 1.1

glibc-setrlimit.patch [new file with mode: 0644]

diff --git a/glibc-setrlimit.patch b/glibc-setrlimit.patch
new file mode 100644 (file)
index 0000000..3fbb50c
--- /dev/null
@@ -0,0 +1,40 @@
+2002-09-28  Roland McGrath  <roland@redhat.com>
+
+       * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
+       Don't call setrlimit, since we did no prior bogon we need to undo.
+
+--- libc/linuxthreads/pthread.c        20 Sep 2002 20:04:23 -0000      1.105
++++ libc/linuxthreads/pthread.c        28 Sep 2002 21:58:05 -0000      1.106
+@@ -1044,7 +1044,6 @@ static void pthread_handle_sigdebug(int 
+ void __pthread_reset_main_thread(void)
+ {
+   pthread_descr self = thread_self();
+-  struct rlimit limit;
+   if (__pthread_manager_request != -1) {
+     /* Free the thread manager stack */
+@@ -1069,11 +1068,19 @@ void __pthread_reset_main_thread(void)
+   THREAD_SETMEM(self, p_resp, &_res);
+ #endif
+-  if (getrlimit (RLIMIT_STACK, &limit) == 0
+-      && limit.rlim_cur != limit.rlim_max) {
+-    limit.rlim_cur = limit.rlim_max;
+-    setrlimit(RLIMIT_STACK, &limit);
+-  }
++#ifndef FLOATING_STACKS
++  /* This is to undo the setrlimit call in __pthread_init_max_stacksize.
++     XXX This can be wrong if the user set the limit during the run.  */
++ {
++   struct rlimit limit;
++   if (getrlimit (RLIMIT_STACK, &limit) == 0
++       && limit.rlim_cur != limit.rlim_max)
++     {
++       limit.rlim_cur = limit.rlim_max;
++       setrlimit(RLIMIT_STACK, &limit);
++     }
++ }
++#endif
+ }
+ /* Process-wide exec() request */
This page took 0.137537 seconds and 4 git commands to generate.