From eee624cf5f661ca32881d40883c0b1b58a8aefa5 Mon Sep 17 00:00:00 2001 From: fyrestone Date: Fri, 5 Feb 2021 13:03:16 +0800 Subject: [PATCH] Revert "Fix passing env on windows (#13253)" (#13828) --- src/ray/util/process.cc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ray/util/process.cc b/src/ray/util/process.cc index a9008df32..0928c4402 100644 --- a/src/ray/util/process.cc +++ b/src/ray/util/process.cc @@ -139,15 +139,6 @@ class ProcessFD { STARTUPINFO si = {sizeof(si)}; RAY_UNUSED( new_env_block.c_str()); // Ensure there's a final terminator for Windows - // MSDN: - // https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa - // Note that an ANSI environment block is terminated by two zero bytes: - // one for the last string, one more to terminate the block. - // A Unicode environment block is terminated by four zero bytes: - // two for the last string, two more to terminate the block. - if (!new_env_block.empty()) { - new_env_block += '\0'; - } char *const envp = &new_env_block[0]; if (CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, envp, NULL, &si, &pi)) { succeeded = true;