cfengine/core — pull request #711 by jimis (2013-05-29 09:20:30+00:00)
Title: Fix a crash happening rarely when exiting serverd

The reason was that even though we were keeping mutexes locked, a thread that
had already opened the database wouldn't be stopped from reading or writing to
it. But all DB-related structures would have been freed by us, so it would
crash.