Xref: utzoo comp.unix.wizards:22419 comp.bugs.4bsd:1570 Path: utzoo!attcan!uunet!snorkelwacker!tut.cis.ohio-state.edu!rutgers!psuvax1!news From: flee@psuvax1.cs.psu.edu (Felix Lee) Newsgroups: comp.unix.wizards,comp.bugs.4bsd Subject: getdtablesize (Re: How to divorce a process ...) Message-ID: Date: 11 Jun 90 22:08:40 GMT References: <1990Jun8.070904.7466@athena.mit.edu> <36447@sequent.UUCP> <11388@pixar.UUCP> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 10 >Modern Unixes have a call to tell you the # of file descriptors: > count = getdtablesize(); Mmph. Note that under SunOS 4.1, getdtablesize() can return something that's less than the number of open files. File descriptors are now a resource affected by getrlimit/setrlimit. getdtablesize returns the current soft limit on number of file descriptors. To ensure that all file descriptors get closed, you should use the hard limit instead. -- Felix Lee flee@cs.psu.edu