From 13a9b985658dab59c17c5d3d2a3682e06689e5e9 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 18 Nov 2016 09:57:51 -0800 Subject: [PATCH] Prevent handle inheritance from blocking Windows async_wrapper (#5666) --- lib/ansible/modules/windows/async_wrapper.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/windows/async_wrapper.ps1 b/lib/ansible/modules/windows/async_wrapper.ps1 index 6463ef3fa4..a79a6d6bb1 100644 --- a/lib/ansible/modules/windows/async_wrapper.ps1 +++ b/lib/ansible/modules/windows/async_wrapper.ps1 @@ -397,7 +397,7 @@ Function Start-Watchdog { $exec_cmd = [Ansible.Async.NativeProcessUtil]::SearchPath("powershell.exe") $exec_args = "`"$exec_cmd`" -NoProfile -ExecutionPolicy Bypass -EncodedCommand $encoded_command" - If(-not [Ansible.Async.NativeProcessUtil]::CreateProcess($exec_cmd, $exec_args, [IntPtr]::Zero, [IntPtr]::Zero, $true, $pstartup_flags, [IntPtr]::Zero, $env:windir, [ref]$si, [ref]$pi)) { + If(-not [Ansible.Async.NativeProcessUtil]::CreateProcess($exec_cmd, $exec_args, [IntPtr]::Zero, [IntPtr]::Zero, $false, $pstartup_flags, [IntPtr]::Zero, $env:windir, [ref]$si, [ref]$pi)) { #throw New-Object System.ComponentModel.Win32Exception throw "create bang $([System.Runtime.InteropServices.Marshal]::GetLastWin32Error())" }