Re: How to increat [sic.] max open files - some answers

David Schwartz (davids@wiznet.net)
Mon, 6 Jan 1997 10:33:45 -0500 (EST)


Processes that want this non-standard behavior can request it
easily. The following code fragment should work:

#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>

struct rlimit r;

r.rlim_cur = r.rlim_max = sizeof(fd_set)*8;
setrlimit(RLIMIT_NOFILE, &r);

David Schwartz

-------------------------------------------------------------------------
In the news today: A fire tore through Bob Dole's library. Both books
were destroyed, and he hadn't even finished coloring one yet.
-------------------------------------------------------------------------

On Mon, 6 Jan 1997, Martin Mares wrote:

> Hello, world!
>
> Isn't it possible for the application to tell the kernel what max. #
> of fd's it can handle? Yes, it's a bit ugly, but it would work.
>
> Martin