ensure we use vfork when single-threaded, even if threading is compiled in
This commit is contained in:
parent
466dfc49e2
commit
042a54ef27
1 changed files with 11 additions and 0 deletions
|
@ -124,6 +124,17 @@ RclConfig *recollinit(RclInitFlags flags,
|
|||
|
||||
#ifndef IDX_THREADS
|
||||
ExecCmd::useVfork(true);
|
||||
#else
|
||||
bool intern_noThr = config->getThrConf(RclConfig::ThrIntern).first == -1;
|
||||
bool split_noThr = config->getThrConf(RclConfig::ThrSplit).first == -1;
|
||||
bool write_noThr = config->getThrConf(RclConfig::ThrDbWrite).first == -1;
|
||||
if (intern_noThr && split_noThr && write_noThr) {
|
||||
LOGDEB0(("rclinit: single-threaded execution: use vfork\n"));
|
||||
ExecCmd::useVfork(true);
|
||||
} else {
|
||||
LOGDEB0(("rclinit: multi-threaded execution: do not use vfork\n"));
|
||||
ExecCmd::useVfork(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
int flushmb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue