public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@wolery.cumb.org>
To: "H . J . Lu" <hjl@lucon.org>
Cc: gcc@gcc.gnu.org
Subject: Re: Problems with the cpp change after 2000-06-18
Date: Mon, 03 Jul 2000 16:24:00 -0000	[thread overview]
Message-ID: <20000703162429.K274@wolery.cumb.org> (raw)
In-Reply-To: <20000703153013.A2200@lucon.org>

On Mon, Jul 03, 2000 at 03:30:13PM -0700, H . J . Lu wrote:
> On Mon, Jul 03, 2000 at 10:54:38AM -0700, Zack Weinberg wrote:
> > > > Try using ulimit -n.
> > > > 
> > > 
> > > I have to build kernel as root. I am not sure "ulimit -n" will help.
> > 
> > Funny, I've never had any trouble building kernels as an unprivileged
> > user.
> > 
> > In any case, resource limits apply to uid 0 processes just as they
> > would any other process; sure, they can call setrlimit() and raise
> > them, but cpp doesn't do that.
> 
> "ulimit -n" seems to work for root. The problem is "ulimit -n" may
> not work for me in my shell since other processes have legitimate
> reasons to open many files.

Which is why this is a test, not the solution - see the other message.

> I tried "ulimit -n 16" which failed. I am running ""ulimit -n 32"
> now. It will take at least an hour to know for sure. Also I don't
> know how portable setrlimit() will be. Is that in libiberty? A
> counter in cpp should work ok.

Believe me, I have no intention of dinking with resource limits inside
cpplib.

We may indeed wind up with a counter.  Another option is to cache the
contents of the file instead of the file descriptor; that would save
even more work, and avoid holding files open.

Question for the audience in general: Are there any supported
platforms where autoconf thinks we can mmap files (HAVE_MMAP_FILE) but
the kernel chokes if you close the file descriptor before you destroy
the mapping?  (I have dim memories of NT acting like this...)  And are
there any supported platforms, etc. with a small limit on the number
of distinct file mappings active at once (entire system or
per-process)?

zw

  reply	other threads:[~2000-07-03 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-03 10:09 H . J . Lu
2000-07-03 10:22 ` Zack Weinberg
2000-07-03 10:40   ` Zack Weinberg
2000-07-03 10:41   ` H . J . Lu
2000-07-03 10:54     ` Zack Weinberg
2000-07-03 15:30       ` H . J . Lu
2000-07-03 16:24         ` Zack Weinberg [this message]
2000-07-03 16:35           ` H . J . Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000703162429.K274@wolery.cumb.org \
    --to=zack@wolery.cumb.org \
    --cc=gcc@gcc.gnu.org \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).