Added check for invalid handle to config storage

This commit is contained in:
Thulinma 2016-07-20 14:56:04 +02:00
parent 7c60f31c09
commit a9dffb9438

View file

@ -99,6 +99,10 @@ namespace Controller {
if (!changed){return;}//cancel further processing if no changes
static IPC::sharedPage mistConfOut(SHM_CONF, DEFAULT_CONF_PAGE_SIZE, true);
if (!mistConfOut.mapped){
FAIL_MSG("Could not open config shared memory storage for writing! Is shared memory enabled on your system?");
return;
}
IPC::semaphore configLock(SEM_CONF, O_CREAT | O_RDWR, ACCESSPERMS, 1);
//lock semaphore
configLock.wait();