+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.
+
2002-09-27 Roland McGrath <roland@redhat.com>
* sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
void __pthread_reset_main_thread(void)
{
pthread_descr self = thread_self();
- struct rlimit limit;
if (__pthread_manager_request != -1) {
/* Free the thread manager stack */
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 */