[R] Rtemp directories accumulating over time
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Apr 30 14:20:56 CEST 2004
I've found a couple of things. The issue is a `sharing violation', which
although it is documented that another process is accessing the dir, it
can be the same process.
Guido's code in R_ShowFiles opened a FindFirst handle and failed to close
it, so sessions using file.show() on temporary files had a sharing
violation. Leaving a file connection open can also do this, and I found
one example in reg-tests-1.R.
The issue remains that on most OSes you can unlink files which are in use,
and on Windows you cannot, *and* `in use' can be in non-obvious ways and
differ for plain files and for directories.
On Thu, 29 Apr 2004, Prof Brian Ripley wrote:
> On Wed, 28 Apr 2004 kjetil at acelerate.com wrote:
>
> > On 28 Apr 2004 at 13:53, Prof Brian Ripley wrote:
> >
> > > On Tue, 27 Apr 2004 kjetil at acelerate.com wrote:
> > >
> >
> > .
> > .
> > > I don't see why: package base is never unloaded so that hook function
> > > is never run. (Indeed, no package/namespace is unloaded except by
> > > explicit user action, in particular not when R is terminated.)
> > >
> > > > So there are also other tmpdirs made by R. Why, where, and why are
> > > > they not removed at exit (when their content are removed)?
> > >
> > > They are removed by R. This is a Windows-only bug, as Windows
> > > sometimes does not act on commands to remove empty directories (but
> > > only sometimes).
> >
> > So is there anything I can do to remedy this nuisance (apart from
> > reinstalling a newer XP (other messages indicates that can give
> > surprises!) or changing OS)?
>
> Well, there is nothing I know how to do. Someone else may know how to
> workaround the Windows bug.
>
> >
> > Kjetil Halvorsen
> >
> > Session temporary directories should only be left
> > > around when a session crashes.
> > >
> > > --
> > > Brian D. Ripley, ripley at stats.ox.ac.uk
> > > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> > > University of Oxford, Tel: +44 1865 272861 (self) 1 South
> > > Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG,
> > > UK Fax: +44 1865 272595
> > >
> > > ______________________________________________
> > > R-help at stat.math.ethz.ch mailing list
> > > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide!
> > > http://www.R-project.org/posting-guide.html
> >
> >
> >
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list