I agree: If '/_restart' were to become a truly "useful" part of the api, it would need to do a graceful shutdown. This might be a useful feature to add, but it's certainly not provided by the attached patch.
However, as it stands today, the tests do depend on the '/_restart' interface, and the issue reported here appears to be the cause of a lot of the flakey test-suite behavior that I (and others) have observed in 1.1.0. This is especially true when accessing couchdb through a proxy, as the proxy's handling of the dropped connection varies depending on the proxy implementation. Unfortunately, this is also one of the cases where the test suite would be most useful – verifying the correctness of a custom reverse-proxy implementation for use in-front-of couchdb.
There are various notes in the dev-list archives about the tests hanging (and other flakey behavior).
With this patch in place, I'm no longer seeing tests hang like that. (I'm still seeing some scattered issues from the test suite – but no hanging)