mirror of https://github.com/ansible/ansible.git
Use os.rename() in async_wrapper
Because the async_status module will read from the same file that the async_wrapper module is writing, it's possible that the file may not be fully synced during a read, causing spurious failures. Use a temp file to do an atomic operation on the file. We can't use atomic_move() here as that doesn't work properly under async. Also, let's not read concurrently from the same file the subprocess is writing to. Instead, capture stdout/stderr via PIPE and write to the file to avoid nasty races.pull/18777/head
parent
f9cb5ecc3c
commit
88122e0f72
Loading…
Reference in New Issue