Improvements to connector shutdown code, attempted fix for Windows support.
This commit is contained in:
parent
2e052fa2a1
commit
d120523bbb
2 changed files with 7 additions and 3 deletions
|
@ -293,7 +293,7 @@ namespace IPC {
|
|||
#ifdef __CYGWIN__
|
||||
if (master) {
|
||||
//Under cygwin, all pages are 4 bytes longer than claimed.
|
||||
handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, len+4, name.c_str());
|
||||
handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, len+4, std::string("Global\\" + name).c_str());
|
||||
} else {
|
||||
int i = 0;
|
||||
do {
|
||||
|
|
|
@ -149,9 +149,13 @@ namespace Controller {
|
|||
std::map<std::string, pid_t>::iterator it;
|
||||
for (it = currentConnectors.begin(); it != currentConnectors.end(); it++){
|
||||
if (!runningConns.count(it->first)){
|
||||
if (Util::Procs::isActive(it->second)){
|
||||
Log("CONF", "Stopping connector " + it->first);
|
||||
Util::Procs::Stop(it->second);
|
||||
}
|
||||
currentConnectors.erase(it);
|
||||
it = currentConnectors.begin();
|
||||
}
|
||||
}
|
||||
|
||||
//start up new/changed connectors
|
||||
|
|
Loading…
Add table
Reference in a new issue