number of simultanously opened files
victor cruceru
victor.cruceru at gmail.com
Sun Aug 21 10:26:39 GMT 2005
And errno (from a failed open) is ....?
On 8/21/05, Divacky Roman <xdivac02 at stud.fit.vutbr.cz> wrote:
>
> hi
>
> I wrote this:
> witten /tmp# cat x.c
> #include <stdio.h>
> #include <fcntl.h>
> #include <sys/limits.h>
>
> #define MAX 100000
> main()
> {
> int i = MAX;
>
> for (; i>0; i--) {
> if (open("/dev/null", O_RDONLY) == -1) {
> printf("FUCK: %i\n", MAX-i);
> printf("FUCK: %i\n", i);
> break;
> }
> }
> getchar();
> }
>
> set:
>
> witten ~# sysctl kern.maxfiles=100000
> kern.maxfiles: 100000 -> 100000
> witten ~# sysctl kern.maxfilesperproc=100000
> kern.maxfilesperproc: 100000 -> 100000
> witten ~#
>
> but I still cannot open more than 7319 files simultaneously. pls can you
> tell
> me why?
>
> thnx
>
> roman
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
More information about the freebsd-hackers
mailing list