Recommit "[lldb] Fix TestSettings.test_pass_host_env_vars on windows"
authorPavel Labath <pavel@labath.sk>
Wed, 25 Mar 2020 12:39:05 +0000 (13:39 +0100)
committerPavel Labath <pavel@labath.sk>
Thu, 2 Apr 2020 09:52:56 +0000 (11:52 +0200)
commit62be83463a3713612bd85cfa45140ef92c130d57
tree544907ab11e5c245bb634d5db475c3c4bfb1ba7c
parent8cc6f5beb816bac152cf170daaa611028124d1cd
Recommit "[lldb] Fix TestSettings.test_pass_host_env_vars on windows"

This patch was reverted because it introduced a failure in
TestHelloWorld.py. The reason for that was running "ls" shell command
failed as it was evaluated in an environment with an empty path. This
has now been fixed with D77123, which ensures that all shell commands
inherit the host environment, so this patch should be safe to recommit.

The original commit message was:

A defensive check in ProcessLauncherWindows meant that we would never
attempt to launch a process with a completely empty environment -- the
host environment would be used instead. Instead, I make the function add
an extra null wchar_t at the end of an empty environment. The
documentation on this is a bit fuzzy, but it seems to be what is needed
to make windows accept these kinds of environments.

Reviewers: amccarth, friss

Differential Revision: https://reviews.llvm.org/D76835
lldb/source/Host/windows/ProcessLauncherWindows.cpp
lldb/test/API/commands/settings/TestSettings.py