mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-03-12 08:02:11 +00:00
mdbx-test: check commandline length under Windows.
This commit is contained in:
parent
30949031c1
commit
f25c20693f
@ -268,9 +268,12 @@ int osal_actor_start(const actor_config &config, mdbx_pid_t &pid) {
|
|||||||
&exename_size))
|
&exename_size))
|
||||||
failure_perror("QueryFullProcessImageName()", GetLastError());
|
failure_perror("QueryFullProcessImageName()", GetLastError());
|
||||||
|
|
||||||
std::string cmdline = "test_mdbx.child ";
|
std::string cmdline = "$ ";
|
||||||
ArgvQuote(cmdline, thunk_param(config));
|
ArgvQuote(cmdline, thunk_param(config));
|
||||||
|
|
||||||
|
if (cmdline.size() >= 32767)
|
||||||
|
return ERROR_BAD_LENGTH;
|
||||||
|
|
||||||
PROCESS_INFORMATION ProcessInformation;
|
PROCESS_INFORMATION ProcessInformation;
|
||||||
if (!CreateProcessA(exename, const_cast<char *>(cmdline.c_str()),
|
if (!CreateProcessA(exename, const_cast<char *>(cmdline.c_str()),
|
||||||
NULL, // Retuned process handle is not inheritable.
|
NULL, // Retuned process handle is not inheritable.
|
||||||
|
Loading…
Reference in New Issue
Block a user