🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1020

File stream leak in make 3.62

#1020
From: Hod Greeley
Date: Wed, 04 Nov 1992 18:12
25 lines
1338 bytes
Hi,
I came across a small problem using make 3.62 on a sun sparc II under
SunOS 4.1.1.  It's in glob_in_dir in glob.c.  When globbing files, the
directory streams aren't closed, and eventually opendir fails with an
errno indicating too many descriptors open for the process.  I can
send a short makefile that shows how the problem arose for me if you
want, but I think it's pretty straightforward.  Here's the patch I
made.  Hope this helps.

*** /reef/hod/src/make-3.62/glob/glob.c Sat Oct 19 16:39:23 1991
--- glob.c      Wed Nov  4 23:10:31 1992
***************
*** 477,482 ****
--- 477,483 ----
              names = new;
              ++nfound;
            }
+       closedir(stream);
      }

    if (nfound == 0 && (flags & GLOB_NOCHECK))


Hod Greeley
hod@cucbs.chem.columbia.edu
Technical Details
Message-ID: <199211050412.AA20591@cucbs.chem.columbia.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!saimiri.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cucbs.chem.columbia.edu!hod

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!saimiri.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cucbs.chem.columbia.edu!hod
From: hod@cucbs.chem.columbia.edu (Hod Greeley)
Subject: File stream leak in make 3.62
Message-ID: <199211050412.AA20591@cucbs.chem.columbia.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 4 Nov 1992 18:12:54 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 26