Skip to main content.
home | support | download

Back to List Archive

Re: Temporary files and RAM Disk

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Thu Oct 23 2003 - 04:00:36 GMT
On Wed, Oct 22, 2003 at 04:39:36PM -0700, Patrick O'Lone wrote:
> Is there any way to make the RAM disk files simply unlink as soon as the
> memory is dumped to disk with just an open file descriptor? For example,
> wouldn't it be better to use tmpfile() so that if SWISH-E indexer is
> interrupted there are no intermediate files left over? Just a thought. :-)

We discussed temp files quite a bit in the past, but I don't remember
the issues.  I can't remember if it was a security issue or a
portability issue.  I see in the code a reference to the
Secure-Programs-HOWTO, and I do remember having mkstemp() recommended
over tmpfile().  But, frankly, I don't remember the details.

The other issue that comes to mind is other platforms.  IIRC, Windows
(or perhaps some Windows versions) won't allow unlinking an open file.

Now, all that may be based on old or just wrong information.  So feel
free to educate us.

Thanks,

-- 
Bill Moseley
moseley@hank.org
Received on Thu Oct 23 04:00:43 2003