Re: Patch to reduce usage of tempnam()

Hi, Andrew!

> Patch looks good, but it is really bad idea to cache location of tmpdir.

Ok, by popular request I'm applying the patch without tmpdir caching.

> As for me it should be fine to write some code to add possibility for
> changing $TMPDIR on the fly. Not all of us are system administrators, so
> it be really good doesn't restart mc when there isn't enough free space in
> /tmp.

I know that MC is the biggest consumer of the /tmp space on all my
systems. Restarting MC is not a big deal, but having a separate directory
for temporary files would be nice. Maybe I'll add support for MC_TMPDIR.

> : The difference is that mc_mkstemps creates the template for you and even
> : adds the directory name (/tmp or $TMPDIR if set). It can be changed to
> : call the native mkstemps if it's available.
> This one is declared as
>     int mkstemps(char *template, int suffixlen)
> on FreeBSD.

I know. It also exists on OpenBSD. It's also implemented in libiberty,
part of gcc and binutils, but it's not in glibc 2.2 for some reason. I'll
try to use it if possible.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]