And errno (from a failed open) is ....?

On 8/21/05, Divacky Roman <[EMAIL PROTECTED]> 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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to