1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop-1.2' into develop-merge-up-20190514

This commit is contained in:
Andrew Hutchings
2019-05-14 13:58:33 +01:00
83 changed files with 469 additions and 638 deletions

View File

@ -148,17 +148,19 @@ void setupSignalHandlers()
#endif
}
void setupCwd(Config* cf)
int8_t setupCwd(Config* cf)
{
string workdir = startup::StartUp::tmpDir();
if (workdir.length() == 0)
workdir = ".";
(void)chdir(workdir.c_str());
int8_t rc = chdir(workdir.c_str());
if (access(".", W_OK) != 0)
(void)chdir("/tmp");
if (rc < 0 || access(".", W_OK) != 0)
rc = chdir("/tmp");
return rc;
}
int setupResources()
@ -344,11 +346,11 @@ int main(int argc, char* argv[])
setupSignalHandlers();
setupCwd(cf);
int err = 0;
err = setupCwd(cf);
mlp = new primitiveprocessor::Logger();
int err = 0;
if (!gDebug)
err = setupResources();
string errMsg;
@ -368,6 +370,10 @@ int main(int argc, char* argv[])
errMsg = "Could not install file limits to required value, please see non-root install documentation";
break;
case -5:
errMsg = "Could not change into working directory";
break;
default:
break;
}