mirror of
https://github.com/aphrody-labs/WSL.git
synced 2026-10-17 12:45:55 +00:00
fix
This commit is contained in:
1 parent
b48f02223d
commit
aa3540ddf0
1 file changed
+1
@@ -394,6 +394,7 @@ void OpenVmmVirtualMachineBackend::Initialize(const VmCreateRequest& Request)
|
||||
process.SetJobObject(m_job.get());
|
||||
SECURITY_ATTRIBUTES inheritable{sizeof(inheritable), nullptr, TRUE};
|
||||
auto input = wsl::windows::common::filesystem::OpenNulDevice(GENERIC_READ);
|
||||
helpers::SetHandleInheritable(input.get());
|
||||
wil::unique_hfile output{CreateFileW(
|
||||
L"NUL", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, &inheritable, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr)};
|
||||
THROW_LAST_ERROR_IF(!output);
|
||||
|
||||
Reference in new issue
Block a user