9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] opendir/closedir in CVS sources
@ 2002-01-08 16:40 Lucio De Re
  0 siblings, 0 replies; 4+ messages in thread
From: Lucio De Re @ 2002-01-08 16:40 UTC (permalink / raw)
  To: 9fans mailing list

Using CVS "import" (thank you Russ, do you know that your efforts can - almost
- be used locally on a plan 9 system?) on a large distribution, one
runs out of, apparently, directory FDs.

Superficial inspection reveals that FDs increment as directories are
opened, but do not get reused once the directory is closed and a new
one opened.

Is it likely that APE closedir() does not release the FD?

++L


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [9fans] opendir/closedir in CVS sources
@ 2002-01-08 16:47 rob pike
  2002-01-08 16:58 ` Lucio De Re
  0 siblings, 1 reply; 4+ messages in thread
From: rob pike @ 2002-01-08 16:47 UTC (permalink / raw)
  To: 9fans

> Is it likely that APE closedir() does not release the FD?

Not very.

-rob

int
closedir(DIR *d)
{
	if(!d){
		errno = EBADF;
		return -1;
	}
	if(close(d->dd_fd) < 0)
		return -1;
	free(d->dirs);
	free(d);
	return 0;
}



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-08 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-08 16:40 [9fans] opendir/closedir in CVS sources Lucio De Re
2002-01-08 16:47 rob pike
2002-01-08 16:58 ` Lucio De Re
2002-01-08 17:45   ` Lucio De Re

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).