Subject: Re: sort(1) opens too many files
To: None <current-users@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: current-users
Date: 04/05/2001 10:13:12
Dave Huang <khym@azeotrope.org> typed:
: On Thu, 5 Apr 2001, Jeremy C. Reed wrote:
:> Couldn't 190 file descriptors already be in use (by something else) and
:> maybe the sort is only using around five?
: It's a per-process limit... file descriptors used by other processes in
: the system wouldn't count towards the limit.

I saw this (with glimpse also) and did a quick investigation.  Seemed
that the BSD sort uses lots of temporary files via mkstemp() then
unlink()ing immediately so they're not visible to ls, etc.  lsof/fstat
shows them.  They'll normally be in /tmp unless you override with -T

Regards,
-- 
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>