Added check for invalid handle to config storage
This commit is contained in:
parent
7c60f31c09
commit
a9dffb9438
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,10 @@ namespace Controller {
|
||||||
if (!changed){return;}//cancel further processing if no changes
|
if (!changed){return;}//cancel further processing if no changes
|
||||||
|
|
||||||
static IPC::sharedPage mistConfOut(SHM_CONF, DEFAULT_CONF_PAGE_SIZE, true);
|
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);
|
IPC::semaphore configLock(SEM_CONF, O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
||||||
//lock semaphore
|
//lock semaphore
|
||||||
configLock.wait();
|
configLock.wait();
|
||||||
|
|
Loading…
Add table
Reference in a new issue