Ticket #38999: patch_to_105748.diff

File patch_to_105748.diff, 593 bytes (added by ajdudman, 11 years ago)

getrlimit setrlimit patch

  • tracelib.c

    old new  
    432432       
    433433        /* raise the limit of open files to the maximum from the default soft limit
    434434         * of 256 */
     435        if (getrlimit(RLIMIT_NOFILE, &rl) == -1)
     436        {
     437                ui_warn("getrlimit failed (%d)", errno);
     438        }
    435439#if defined(__APPLE__) && defined(OPEN_MAX)
    436440        if (rl.rlim_max > OPEN_MAX)
    437441                rl.rlim_max = OPEN_MAX;
    438442#endif
    439443        rl.rlim_cur = rl.rlim_max;
    440         if(setrlimit(RLIMIT_NOFILE, &rl)==-1)
     444        if (setrlimit(RLIMIT_NOFILE, &rl) == -1)
    441445        {
    442446                ui_warn("setrlimit failed (%d)", errno);
    443447        }