================
@@ -242,8 +242,10 @@ llvm::ErrorOr<std::vector<HANDLE>>
ProcessLauncherWindows::GetInheritedHandles(
for (size_t i = 0; i < launch_info.GetNumFileActions(); ++i) {
const FileAction *act = launch_info.GetFileActionAtIndex(i);
if (act->GetAction() == FileAction::eFileActionDuplicate &&
- act->GetFD() == act->GetActionArgument())
- inherited_handles.push_back(reinterpret_cast<HANDLE>(act->GetFD()));
+ act->GetFD() == act->GetActionArgument() &&
+ std::find(inherited_handles.begin(), inherited_handles.end(),
+ act->GetHandle()) != inherited_handles.end())
----------------
slydiman wrote:
Nice catch. It seems the condition must be `== inherited_handles.end()`.
inherited_handles must be a set, no duplicates.
https://github.com/llvm/llvm-project/pull/179274
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits