mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
Don't call setrlimit, since we did no prior bogon we need to undo.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2002-09-27 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
|
* sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
|
||||||
|
@ -1044,7 +1044,6 @@ static void pthread_handle_sigdebug(int sig)
|
|||||||
void __pthread_reset_main_thread(void)
|
void __pthread_reset_main_thread(void)
|
||||||
{
|
{
|
||||||
pthread_descr self = thread_self();
|
pthread_descr self = thread_self();
|
||||||
struct rlimit limit;
|
|
||||||
|
|
||||||
if (__pthread_manager_request != -1) {
|
if (__pthread_manager_request != -1) {
|
||||||
/* Free the thread manager stack */
|
/* Free the thread manager stack */
|
||||||
@ -1069,11 +1068,19 @@ void __pthread_reset_main_thread(void)
|
|||||||
THREAD_SETMEM(self, p_resp, &_res);
|
THREAD_SETMEM(self, p_resp, &_res);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (getrlimit (RLIMIT_STACK, &limit) == 0
|
#ifndef FLOATING_STACKS
|
||||||
&& limit.rlim_cur != limit.rlim_max) {
|
/* This is to undo the setrlimit call in __pthread_init_max_stacksize.
|
||||||
limit.rlim_cur = limit.rlim_max;
|
XXX This can be wrong if the user set the limit during the run. */
|
||||||
setrlimit(RLIMIT_STACK, &limit);
|
{
|
||||||
}
|
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 */
|
/* Process-wide exec() request */
|
||||||
|
Reference in New Issue
Block a user