httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David Whitmarsh)
Subject [PATCH] Garbage Collection on win32
Date Fri, 30 Apr 1999 02:23:48 GMT

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

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



David Whitmarsh

Sparkle Computer Co Ltd

Sybase C C++ perl UNIX NT


View raw message