Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
6077.1 | kdbx | SMURF::SCOTT | Mon Jul 01 1996 13:19 | 3 | |
6077.2 | lsof | CECMOW::RAIKO | Tue Jul 02 1996 05:43 | 9 | |
6077.3 | HOW MANY fds are open? | TAV02::GLASS | Yossi Glass, 882-3254 | Wed Mar 12 1997 11:03 | 6 |
Is there any way for a process to find HOW MANY file descriptors are already opened by it? Thx, Y. | |||||
6077.4 | VAXCPU::michaud | Jeff Michaud - ObjectBroker | Wed Mar 12 1997 11:33 | 11 | |
> Is there any way for a process to find HOW MANY file descriptors are already > opened by it? get the the size of the fd table (such as by using getdtablesize()) and cycle for( i = 0 ; i < maxfd ; i++) and fstat(2) each one. If you get back -1 and errno equal to EBADF then that fd number is not in use, else it is. of course if you are using threads then the count you get will likely be only an approximation depending on what the other threads are doing .... |