Thread (9 messages) 9 messages, 6 authors, 2011-07-26

no files can be opened in a C program

From: Abhijit Pawar <hidden>
Date: 2011-07-25 12:35:29

On 07/25/2011 05:29 PM, Naveen Kumar wrote:
You can use command ulimit -a, there you can check the limit for a 
process.

Thanks,
Naveen
Ulimit gives 1024 as open file limit. In struct task_struct it has a 
member called struct files_struct *files;

I tried checking for this member and the limit however I am  not able to 
decide correctly why the limit is 1024.
  Also, is there any distinction between 32 bit and 64 bit systems for 
this limit?

On Mon, Jul 25, 2011 at 5:18 PM, Anuz Pratap Singh Tomar 
<chambilkethakur at gmail.com <mailto:chambilkethakur@gmail.com>> wrote:



    On Mon, Jul 25, 2011 at 12:31 PM, Venkateswarlu P
    <p.venkatesh551 at gmail.com <mailto:p.venkatesh551@gmail.com>> wrote:


        What is the Max no of files that can be opened simultaneously
        within a Single C program.

        i want this information for kenel compilation


    See man 3 setrlimit
    Total number of files that can be opened should depend on file system.
    And what this has to do with kernel compilation?







        _______________________________________________
        Kernelnewbies mailing list
        Kernelnewbies at kernelnewbies.org
        <mailto:Kernelnewbies@kernelnewbies.org>
        http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



    _______________________________________________
    Kernelnewbies mailing list
    Kernelnewbies at kernelnewbies.org
    <mailto:Kernelnewbies@kernelnewbies.org>
    http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regards,
Abhijit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110725/f1f0846a/attachment-0001.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help