From f25c20693f033e0cc40cca8348f2878968b7be76 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Fri, 14 Sep 2018 14:02:28 +0300 Subject: [PATCH] mdbx-test: check commandline length under Windows. --- test/osal-windows.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/osal-windows.cc b/test/osal-windows.cc index b8cdb535..81f1da7f 100644 --- a/test/osal-windows.cc +++ b/test/osal-windows.cc @@ -268,9 +268,12 @@ int osal_actor_start(const actor_config &config, mdbx_pid_t &pid) { &exename_size)) failure_perror("QueryFullProcessImageName()", GetLastError()); - std::string cmdline = "test_mdbx.child "; + std::string cmdline = "$ "; ArgvQuote(cmdline, thunk_param(config)); + if (cmdline.size() >= 32767) + return ERROR_BAD_LENGTH; + PROCESS_INFORMATION ProcessInformation; if (!CreateProcessA(exename, const_cast(cmdline.c_str()), NULL, // Retuned process handle is not inheritable.