RE: ulimit settings for build & run ?
RE: ulimit settings for build & run ?
- Subject: RE: ulimit settings for build & run ?
- From: "David Carpeneto" <email@hidden>
- Date: Thu, 28 Dec 2006 18:31:17 -0500
- Thread-topic: ulimit settings for build & run ?
This works great. Was looking @ ulimit(3), not realizing that setrlimit existed :-)
Thanks very much - Dave
-----Original Message-----
From: xcode-users-bounces+carpeneto=email@hidden on behalf of Justin C. Walker
Sent: Sat 12/23/2006 2:09 PM
To: Xcode Users
Subject: Re: ulimit settings for build & run ?
On Dec 23, 2006, at 09:20 , David Carpeneto wrote:
> Hi all - Newbie-esque question - I'm opening up a *lot* of file
> descriptors in something I'm doing, and quickly bang into the
> ulimit (-n
> is by default 256).
>
> Is there a simple way to jack up the ulimit for the thing I'm
> building ?
> Or do I need to wrap the built product in a shell that sets the
> ulimit,
> then launch my app (which is what I'm used to doing in Java) ?
The system limits the number of open file descriptors, per process.
The default, as you say, is 256. You can check, with sysctl(1) or
(2) to see what the max, system-wide and per-process, is. On my
10.4.8 system, the per-process limit is
kern.maxfilesperproc = 10240
The total number of open files in the system is limited to
kern.maxfiles = 12288
You use setrlimit(2) to modify this value per-process. I've never
dealt with this feature, so I can't say what the programming burden
would be, but you can definitely raise the limit (programmatically).
Doing it via the shell seems fraught with problems.
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
If you're not confused,
You're not paying attention
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden