[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Poll's grænse



In <sslug@sslug> "Erwin S. Andreasen" <sslug@sslug> writes:

>Robert Larsen <sslug@sslug> writes:

>>
>> Derfor har jeg skrevet koden om til at bruge poll, som ikke skulle
>> have en grænse....men det har den, stadigvæk 1024. Der står i manual
>> siden, at poll kan sætte errno til enten EBADF, ENOMEM, EFAULT eller
>> EINTR, men jeg har følgende kode:

Alt har jo en grænse. Også poll.

I sidste ende havner du nede i det kerne-syscall, der hedder 
sys_poll(), som findes i fs/select.c filen. Her kan man se at
det starter således:

        /* Do a sanity check on nfds ... */
        if (nfds > current->files->max_fdset && nfds > OPEN_MAX)
                return -EINVAL;

OPEN_MAX er en konstant, den er 256.

"current->files->max_fdset" er din proces' værdi for det maximale
antal åbne filer. Typisk er det 1024 (se "ulimit -n").

Jeg tror det er der, din 1024-grænse rammes. Men det burde jo så også
betyde at du slet ikke kan skaffe dig alle de åbne file-descriptors
som du mener at du skal sende videre til poll() - det burde fejle
allerede når du prøver at lave en open() eller accept().


Mvh,
Henrik


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *