Ticket #8912: 0001-getrlimit-with-RLIMIT_STACK-now-returns-USER_MAIN_TH.patch

File 0001-getrlimit-with-RLIMIT_STACK-now-returns-USER_MAIN_TH.patch, 894 bytes (added by edglex, 9 years ago)
  • src/system/kernel/thread.cpp

    From 6ca2348f660dd6c088309907e70243cdd292bbb3 Mon Sep 17 00:00:00 2001
    From: Edward Robbins <edd.robbins@gmail.com>
    Date: Thu, 23 Aug 2012 13:01:15 +0000
    Subject: [PATCH 1/1] getrlimit with RLIMIT_STACK now returns
     USER_MAIN_THREAD_STACK_SIZE
    
    ---
     src/system/kernel/thread.cpp |    5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp
    index 6c95268..6227dd2 100644
    a b common_getrlimit(int resource, struct rlimit * rlp)  
    12841284
    12851285        case RLIMIT_STACK:
    12861286        {
    1287             Thread *thread = thread_get_current_thread();
    1288             rlp->rlim_cur = thread->user_stack_size;
    1289             rlp->rlim_max = thread->user_stack_size;
     1287            rlp->rlim_cur = USER_MAIN_THREAD_STACK_SIZE;
     1288            rlp->rlim_max = USER_MAIN_THREAD_STACK_SIZE;
    12901289            return B_OK;
    12911290        }
    12921291