最近遇到一个问题,程序在a用户下运行后,然后注销windows,登陆b用户,发现程序奔溃,抓了下堆栈,发现了boost的named_mutex一些细节,记录下
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/creation_tags.hpp><br>
boost::interprocess::named_mutex mutex(boost::interprocess::open_or_create, "haha");
1.这段代码在a用户运行后,注销,在运行b用户,直接崩溃
解决方案
boost::interprocess::permissions per;
per.set_unrestricted();
boost::interprocess