Jeff Abrahamson on 24 Feb 2004 14:01:02 -0000 |
On Tue, Feb 24, 2004 at 08:38:05AM -0500, LeRoy Cressy wrote: > [62 lines, 356 words, 2463 characters] Top characters: etonasl_ > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Tobias DiPasquale wrote: > > On Tue, 2004-02-24 at 07:08, LeRoy Cressy wrote: > > > >>does anyone know why Apache is using deleted tmp files without closing > >>them first? > > > > > > If you open a file and then delete it, but do not close it, you then > > have a file that will automatically be removed when you exit the process > > (intentionally or unintentionally). This is an easy way to clean up a > > domain socket: after both processes have opened the file, one of them > > deletes it. When its time to close the domain socket, both processes > > just exit normally and don't have to worry about which one deletes the > > domain socket. Since the file is already marked as deleted and only now > > has a use count of 0, it will actually be removed implicity by the > > filesystem. > > This is an on going thing with apache and apache-ssl. Now mysql has a > bug report against it for the same thing. Since these are servers, > stopping the process cleans up the deleated files as you said, but when > you restart apache, there are new ones created which are marked as being > deleted. > > What I was asking, does anyone know why apache does not close the file > prior to deleting it? This has been around for a long time and I wonder > what the reasoning is. I'm not sure I follow your question, LeRoy, as I would have answered both your first and question just as Toby did. If it closed the files, then they would be unlinked and it would not have access to the contents. If it didn't delete them, then it would need to provide an alternate mechanism to clean up its scratch files on deletion. Do you mean, why does apache use scratch files? -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B Attachment:
signature.asc
|
|