1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-01 01:22:04 +03:00

Merge pull request #943 from LinuxJedi/MCOL-3559

MCOL-3559 Stop postConfigure if mysqld is running
This commit is contained in:
benthompson15
2019-11-20 20:52:40 +01:00
committed by GitHub

View File

@@ -539,6 +539,18 @@ int main(int argc, char* argv[])
exit (1);
}
char buf[512];
FILE *cmd_pipe = popen("pidof -s mysqld", "r");
fgets(buf, 512, cmd_pipe);
pid_t pid = strtoul(buf, NULL, 10);
pclose(cmd_pipe);
if (pid)
{
cout << "MariaDB Server is currently running on PID " << pid << ". Cannot run postConfigure whilst this is running. Exiting.." << endl;
exit (1);
}
//check Config saved files
if ( !checkSaveConfigFile())
{