This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCH merge: bootstrap failure, gengtype consumes all file descriptors


 > From: Zack Weinberg <zack@codesourcery.com>
 > 
 > On Mon, Jun 10, 2002 at 08:01:13PM -0700, Geoff Keating wrote:
 > > > Can gengtype.c be changed so that we operate on only one of its output
 > > > files at a time so as not to consume so many file descriptors?
 > > 
 > > It's possible but not easy.  Probably the easiest thing would be to
 > > close and re-open the temporary files during processing.  Of course,
 > > that requires knowing their names...
 > > 
 > > Care to suggest a patch?
 > 
 > We're looking at ~100K of data.  Why not build each file in memory,
 > using say an obstack for each, then blat them all to disk when done?
 > zw

While I think Zack's solution is the right thing long term, IMHO the
author of the code would be in the best position to make this kind of
structural change (i.e. not me.)

What I'm willing to do is supply a patch to increase the FD soft limit
to the hard value.  I'd bet this will get around the problem for most
users and I'll file a PR referencing this discussion in case anyone
gets motivated to go with Zack's idea.

		--Kaveh
--
Kaveh R. Ghazi			Director of Systems Architecture
ghazi@caip.rutgers.edu		Qwest Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]