You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Whitmarsh <da...@dial.pipex.com> on 1999/04/30 04:23:48 UTC

[PATCH] Garbage Collection on win32

Garbage collection didn't work on Win32 because of an attempt to open
a directory as a file. This always seems to fail under windows. I
re-arranged the logic to do the stat() first, then only do an open()
if it isn't a directory.


Also, I have added code to spawn a new thread for the garbage
collection function in a manner analagous to the fork used in unix GC,
incidentally renaming create_thread to ap_create_thread and exporting
it from multithread.c. This works on win95 but I haven't tested it on
NT or 98 (but I see no reason why it shouldn't work) and I don't know
whether it would be applicable to OS/2.

The garbage collection thread now uses its own global pool as it is no
longer guaranteed that the request structure will be valid for the
duration of the garbage collection process.

Finally, the patch includes the fix for the declspec(thread) problem
on windows 95.

I have changed the scope and use of the static variable "inside" to
guard against new GC threads being spawned while one is still active.

None of these changes should affect behaviour on platforms other than
win32.

The patch is made against yesterdays snapshot -
apache-1.3_19990428191219.tar.gz - and so works with the
should_proxy_garbage_coll() change.



David



************************************

David Whitmarsh

Sparkle Computer Co Ltd

Sybase C C++ perl UNIX NT

************************************