1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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 c63b8f402a
commit 8d6a25a23f
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 {