make windows async ... async (#22624)

Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
This commit is contained in:
Matt Davis 2017-03-14 16:37:55 -07:00 committed by GitHub
commit ce56da69b2
2 changed files with 75 additions and 14 deletions

View file

@ -1,3 +1,7 @@
- name: capture timestamp before fire and forget
set_fact:
start_timestamp: "{{ lookup('pipe', 'date +%s') }}"
- name: async fire and forget
async_test:
sleep_delay_sec: 5
@ -12,6 +16,8 @@
- asyncresult.started == 1
- asyncresult.finished == 0
- asyncresult.results_file is search('\.ansible_async.+\d+\.\d+')
# ensure that async is actually async- this test will fail if # hosts > forks or if the target host is VERY slow
- (lookup('pipe', 'date +%s') | int) - (start_timestamp | int) < 5
- name: async poll immediate success
async_test: