Ensure we mkdir before spawning PID file
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,3 +5,6 @@ rmpsd
|
|||||||
agent/*.o
|
agent/*.o
|
||||||
agent/agent
|
agent/agent
|
||||||
qt5-cli/*
|
qt5-cli/*
|
||||||
|
docs/distribution/archlinux/src
|
||||||
|
docs/distribution/archlinux/rmps*
|
||||||
|
docs/distribution/archlinux/pkg
|
||||||
|
|||||||
@@ -318,10 +318,9 @@ static int test_conf_syntax(void)
|
|||||||
if (fopen_and_mkdir(conf.rmps.errlog) != 0)
|
if (fopen_and_mkdir(conf.rmps.errlog) != 0)
|
||||||
failed = 1;
|
failed = 1;
|
||||||
} else if (!strcmp(buf, "rmps.pidfile")) {
|
} else if (!strcmp(buf, "rmps.pidfile")) {
|
||||||
strcpy(conf.rmps.pidfile, tmp + 1);
|
strncpy(conf.rmps.pidfile, tmp + 1, sizeof(conf.rmps.pidfile) - 1);
|
||||||
/*if (fopen_and_mkdir(conf.rmps.pidfile) != 0)
|
if (fopen_and_mkdir(conf.rmps.pidfile) != 0)
|
||||||
* failed = 1;
|
failed = 1;
|
||||||
*/
|
|
||||||
} else if (!strcmp(buf, "rmps.loglevel")) {
|
} else if (!strcmp(buf, "rmps.loglevel")) {
|
||||||
if (strlen(tmp + 1) == 1 &&
|
if (strlen(tmp + 1) == 1 &&
|
||||||
(tmp[1] > '0' && tmp[1] < '5'))
|
(tmp[1] > '0' && tmp[1] < '5'))
|
||||||
|
|||||||
Reference in New Issue
Block a user