ansible/lib
David Shrewsbury 88122e0f72 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.
2016-12-08 11:24:40 -05:00
..
ansible Use os.rename() in async_wrapper 2016-12-08 11:24:40 -05:00