octave-maintainers
[Top][All Lists]
Advanced

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

Re: tmp gets full when plotting many images


From: Przemek Klosowski
Subject: Re: tmp gets full when plotting many images
Date: Tue, 27 Mar 2007 08:38:59 -0500 (EST)

   > 
   > | For instance, would it work to keep a record of file
   > | names, and delete files which were used in a previous plot upon
   > | creating a subsequent one?
   > 
   > I think it is possible for gnuplot to still be processing a previous
   > plot when Octave starts a new plot.  I don't see how to avoid that
   > race condition.  Since it looks like it is possible to send all the
   > data in the pipe, I think that's the best solution.

   Here's another option as a couple people suggested on the gnuplot list, but 
   unfortunately I'm not sure it is portable... only of use in unix based 
systems: 
     stuff an "rm" at the end of the plot command so that gnuplot removes the 
file 
   afterward:

Actually, that is a great point---it is certainly true on Unix, but I
think also on Windows and Mac: when a program opens a disk file, the
OS holds the disk metadata.  At that point, the file might be deleted
from the filesystem, but the program will still be able to access it,
including reading/writing/appending. Only after the file is closed
will the data and metadata be released and the file will be gone for
good.

Perhaps it'd be possible to aggresively delete the temp files, then,
as soon as we know that gnuplot opened them, unless gnuplot was in the
habit of repeated opening and closing of files.

      p     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]