LeRoy Cressy on 24 Feb 2004 13:41:02 -0000


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

Re: [PLUG] Apache using deleated files


-----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.


As for why its using those particular deleted files, you'll have to use the source for that.



- -- Rev. LeRoy D. Cressy mailto:leroy@lrcressy.com /\_/\
http://lrcressy.com ( o.o )
Phone: 215-535-4037 > ^ <
FAX: 215-535-4285


gpg fingerprint:  62DE 6CAB CEE1 B1B3 359A  81D8 3FEF E6DA 8501 AFEA

For info on enigmail:    http://lrcressy.com/linux/mozilla.pdf
For info on gpg:         http://www.gnupg.org/

Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me. (John 14:6)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFAO1PGP+/m2oUBr+oRAtzWAJ9Emu8UlfwIZ5VxzaP8yFS2SabrQQCfVmsh
qjraNveU3EqacPkkr4ZGUVc=
=8Qc0
-----END PGP SIGNATURE-----

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug