Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rutgers!att!cbnews!lml From: lml@cbnews.ATT.COM (L. Mark Larsen) Newsgroups: comp.bugs.sys5 Subject: libPW.a(curdir.o) [SVR3.0+] Message-ID: <5226@cbnews.ATT.COM> Date: 29 Mar 89 18:36:32 GMT Reply-To: lml@cbnews.ATT.COM (L. Mark Larsen) Organization: AT&T Bell Laboratories Lines: 19 With SVR3.0, libPW.a(curdir.o) uses a new algorithm that doesn't chdir(). Unfortunately, a small bug was introduced which causes each invocation of curdir() to leave open an extra file descriptor. If you use something like build, which calls curdir() twice and usually is fork'd several levels deep, you quickly run out of file descriptors for the real work. For those with source, the solution is to add a call to closedir() just before the return when identical() returns true: if( identical( &cdirectory, sbp ) ) { closedir( cdp ); /* missing call in original source */ stradd( str, "/" ); return str; } For those without source, you could always use a pre-SVR3.0 version with the old algorithm - it worked fine. L. Mark Larsen att!atlas!lml lml@atlas.ATT.COM