1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug #43005 main.init_connect fais on Windows in PB2

Server args containing spaces do not work on Windows
Fixed my_safe_rprocess-win to re-apply "" around such args
This commit is contained in:
Bjorn Munch
2009-07-15 14:20:56 +02:00
parent 47fa03abe7
commit 6fed1e15c2
3 changed files with 8 additions and 3 deletions

View File

@ -188,7 +188,14 @@ int main(int argc, const char** argv )
die("No real args -> nothing to do");
/* Copy the remaining args to child_arg */
for (int j= i+1; j < argc; j++) {
to+= _snprintf(to, child_args + sizeof(child_args) - to, "%s ", argv[j]);
if (strchr (argv[j], ' ')) {
/* Protect with "" if this arg contains a space */
to+= _snprintf(to, child_args + sizeof(child_args) - to,
"\"%s\" ", argv[j]);
} else {
to+= _snprintf(to, child_args + sizeof(child_args) - to,
"%s ", argv[j]);
}
}
break;
} else {