Changed /dev/shm folder names to maxscale.<pid> instead of only <pid>.
This commit is contained in:
@ -2507,6 +2507,7 @@ static bool logfile_init(
|
|||||||
char* c;
|
char* c;
|
||||||
pid_t pid = getpid();
|
pid_t pid = getpid();
|
||||||
int len = strlen(shm_pathname_prefix)+
|
int len = strlen(shm_pathname_prefix)+
|
||||||
|
+ strlen("maxscale.") +
|
||||||
get_decimal_len((size_t)pid) + 1;
|
get_decimal_len((size_t)pid) + 1;
|
||||||
|
|
||||||
c = (char *)calloc(len, sizeof(char));
|
c = (char *)calloc(len, sizeof(char));
|
||||||
@ -2516,7 +2517,7 @@ static bool logfile_init(
|
|||||||
succp = false;
|
succp = false;
|
||||||
goto return_with_succp;
|
goto return_with_succp;
|
||||||
}
|
}
|
||||||
sprintf(c, "%s%d", shm_pathname_prefix, pid);
|
sprintf(c, "%smaxscale.%d", shm_pathname_prefix, pid);
|
||||||
logfile->lf_filepath = c;
|
logfile->lf_filepath = c;
|
||||||
|
|
||||||
if (mkdir(c, S_IRWXU | S_IRWXG) != 0 &&
|
if (mkdir(c, S_IRWXU | S_IRWXG) != 0 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user