VirtualBox

Changeset 16267 in vbox for trunk/src/libs/xpcom18a4


Ignore:
Timestamp:
Jan 27, 2009 4:59:57 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42083
Message:

#3575: bump IPC_MAX_CLIENTS to 1500 (unix platforms) and fd softlimit to 2048 (Solaris only).

Location:
trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcdPrivate.h

    r1 r16267  
    4545// XXX may want to make this more dynamic
    4646//
    47 #define IPC_MAX_CLIENTS 100
     47#define IPC_MAX_CLIENTS 1500
    4848
    4949//
  • trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp

    r13810 r16267  
    4444#include <stdlib.h>
    4545#include <string.h>
     46
     47#ifdef RT_OS_SOLARIS
     48# include <sys/resource.h>
     49#endif
    4650
    4751#include "prio.h"
     
    474478        PL_strncpyz(addr.local.path, argv[1], sizeof(addr.local.path));
    475479
     480#ifdef RT_OS_SOLARIS
     481        struct rlimit lim;
     482        if (getrlimit(RLIMIT_NOFILE, &lim) == 0)
     483        {
     484            if (lim.rlim_cur < 2048)
     485            {
     486                lim.rlim_cur = 2048;
     487                if (setrlimit(RLIMIT_NOFILE, &lim) != 0)
     488                {
     489                    getrlimit(RLIMIT_NOFILE, &lim);
     490                    printf ("WARNING: failed to increase per-process file-descriptor limit to 2048\n", lim.rlim_cur);
     491                }
     492            }
     493        }
     494        else
     495            printf ("WARNING: failed to obtain per-process file-descriptor limit.\n");
     496#endif
     497
    476498#ifdef IPC_USE_FILE_LOCK
    477499    Status status = InitDaemonDir(addr.local.path);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette