9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@ar.aichi-u.ac.jp
To: 9fans@cse.psu.edu
Subject: [9fans] BUG of /sys/src/cmd/split.c
Date: Thu, 28 Dec 2000 23:17:55 -0500	[thread overview]
Message-ID: <20001228142505.73AFA19A0B@mail.cse.psu.edu> (raw)

Hello

split.c wastes file descriptor:

cpu% split -e '^From' /n/ken/usr/spool/mail/arisawa
split 1297714: warning: process exceeds 100 file descriptors


The file descriptor is created and discarded in openf(void):

void
openf(void)
{
	int fd;
	Bflush(output);
	Bterm(output);
	fd = create(name,OWRITE,0666);
	if(fd < 0) {
		fprint(2, "grep: can't create %s: %r\n", name);
		exits("create");
	}
	Binit(output, fd, OWRITE);
}


Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp


             reply	other threads:[~2000-12-29  4:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-29  4:17 arisawa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-12-28 14:51 rob pike

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=20001228142505.73AFA19A0B@mail.cse.psu.edu \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).