Lennon Day-Reynolds wrote:

 > Try disabling keep-alive, (either in your HTML head section, or using
 > raw headers in your servlets) and see if the process shuts down
 > normally.

I'll give that a go, although interestingly it'll hang even if it has 
never served a single item.  Simply starting the script and then trying 
to terminate it right away will make it hang.