How do I take ownership of an abandoned boost::interprocess::interprocess_mutex?

Unfortunately, this isn’t supported by the boost::interprocess API as-is. There are a few ways you could implement it however: If you are on a POSIX platform with support for pthread_mutexattr_setrobust_np, edit boost/interprocess/sync/posix/thread_helpers.hpp and boost/interprocess/sync/posix/interprocess_mutex.hpp to use robust mutexes, and to handle somehow the EOWNERDEAD return from pthread_mutex_lock. If you are on some other platform, you … Read more