mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(re)add post-watchdog-launch sleep to Windows async_wrapper (#5122)
fixed apparent race where subprocess appears to never start
This commit is contained in:
parent
d4c2a13325
commit
48b0cb750c
1 changed files with 4 additions and 0 deletions
|
@ -324,6 +324,10 @@ Function Start-Watchdog {
|
|||
# FUTURE: use CreateProcess + stream redirection to watch for/return quick watchdog failures?
|
||||
$result = $([wmiclass]"Win32_Process").Create($exec_path, $null, $pstartup)
|
||||
|
||||
# On fast + idle machines, the process never starts without this delay. Hopefully the switch to
|
||||
# Win32 process launch will make this unnecessary.
|
||||
Sleep -Seconds 1
|
||||
|
||||
$watchdog_pid = $result.ProcessId
|
||||
|
||||
return $watchdog_pid
|
||||
|
|
Loading…
Reference in a new issue