<pre><code>Apache/2.2.6 (Unix) DAV/2 mod_python/3.2.8 Python/2.4.4 configured ...
</code></pre>

<p>One of apache processes spawns some long-running python script asynchronously, and apparently doesn't seem to collect its child process table entry. After that long-run-in-subprocess python script finishes - defunct python process has been left.</p>

<pre><code># ps -ef | grep httpd
root     23911     1  0 Oct15 ?        00:00:01 /usr/sbin/httpd
...
qa       23920 23911  0 Oct15 ?        00:00:00 /usr/sbin/httpd


# ps -ef | grep python
...
qa       28449 23920  0 12:38 ?        00:00:00 [python] &lt;defunct&gt;
</code></pre>

<p>What is the way to make the Apache process to collect its children? Is it possible to do the job via a mod_python request handler ( like PythonCleanupHandler for example)?</p>

<p>Thanks.</p>

Sure you can add a post-build event to rename the assembly. This will work if your solution has only one assembly.
But if your solution consists of several projects, you normally have one project referencing the assembly generated by another problem. Imagine your solution has has two projets: the first one creates a Windows Forms exe (MyApp.EXE), which references the assembly created by the second project (MyData.DLL).
In this example the debug EXE would be named MyAppDebug.EXE, and it needs to reference MyDataDebug.EXE. And this will not work with renaming in a post-build event.
Therefore I strongly recommend not to do any renaming.