cloudant/fabric — pull request #54 by davisp (2012-07-31 22:13:52+00:00)
Title: Make sure and cleanup spawned db update listeners

The showroom_users_cache changes feed `exit`'s ever so often to avoid
"getting stuck". The propogation of the `exit` signal ended up killing
the fabric_db_update_listener process before it had a chance to cleanup
the processes it spawned on remote nodes.

This patch adds a process that traps exits and calls the cleanup
regardless of how the fabric_db_update_listener finishes (by returning
or if the process disappears). This should fix most of the issue
although it does not fix the issue if the VM dissappears instantaneously
(ie, segfault). For that we need to add something on the remote side
that will flush rexi processes when a node disappears.