[17485] in Athena Bugs
clean_tmp_areas
daemon@ATHENA.MIT.EDU (Dan Winship)
Mon Jan 24 11:57:15 2000
Message-Id: <200001241657.LAA66089@antharia.mit.edu>
To: bugs@MIT.EDU
Date: Mon, 24 Jan 2000 11:57:08 -0500
From: Dan Winship <danw@MIT.EDU>
System name: antharia.mit.edu
Type and version: IP32 8.3.25 (with mkserv)
Display type: CRM
Shell: /bin/athena/tcsh
Window manager: unknown
What's wrong:
clean_tmp_areas always uses "-mtime +1" to pick directories to
delete: it can't use the same rule as is used for files,
because find will always cause the directory's atime to be
changed before it gets a chance to look at it, so "-atime +1"
would always be false.
Unfortunately, as soon as it deletes a subdirectory of a
directory, that directory's mtime is changed, and so it will
be unable to delete that directory. Thus, clean_tmp_areas
*still* has the "delete directory hierarchies one level per
day" bug.
This is the cause of [17358].
What should have happened:
Entire directory hierarchies should be removed once they are
too old.
This would require keeping a list of files/directories to be
deleted while browsing the hierarchy, and then deleting them
all at once after scanning the whole tree.
Doing this securely in a shell script would be incredibly
difficult at best. This will probably require a
clean_tmp_areas binary.