Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: basesrc



On Wed, Mar 08, 2000 at 03:54:26AM +1100, Robert Elz wrote:
>   | Most programs (tar, pax, compiler stuff, many, many packages - nearly
>   | everything except updateddb.csh?) use /tmp as default to store their
>   | temporary files
> 
> sort doesn't.   sort and updatedb are the two which have a tendancy to
> generate huge files (sometimes).
Oh, it does:

strings /usr/bin/sort |grep tmp
/tmp

man sort:
       [...]
       If the environment variable TMPDIR is set, sort uses it as
       the  directory  in which to put temporary files instead of
       the default, /tmp.
       [...]

gnu/usr.bin/sort.c:
  [...]
  temp_file_prefix = getenv ("TMPDIR");
  if (temp_file_prefix == NULL)
    temp_file_prefix = "/tmp";
  [...]


>   | ---often larger than the average stuff updatedb.csh creates---
                               ^^^^^^^
> 
> You must have small filesystems - the updatedb files I've seen
> can run to hundreds of MB.
Around ~16GB on one system (one of them that pukes about too small
/var/tmp when running weekly).

Wich is about average I guess.

>   | Nobody should make asumptions about the size of /tmp or /var/tmp,
> 
> If there are to be any defaults at all, some kinds of assumptions need
> to be made - the ideal is not to just change things to suit the needs of
> any odd user - but to look at the common case.
I think I'm "Joe Average Common User" :-)

>   | So (IMHO) updatedb.csh really should use /tmp - if this doesn't work for
>   | some user [s]he will have to adjust the size of /tmp or set TMPDIR (e.g. 
> in
>   | weekly.conf) to something else - as [s]he has to do with every other 
> program.
> 
> I'd say exactly the opposite - put things back the way they were, if
> some user needs /tmp to be used because they have a very small /var, then
> they get to set TMPDIR ...
Ok, go and change sort&co. now and upset other people...

All NetBSD tools should show the same behaviour IMHO.
-- 
Dies ist Thilos Unix Signature! Viel Spass damit.



Home | Main Index | Thread Index | Old Index