commit | 617fe12a378b67ba2c76c4925e5cdee116021e19 | [log] [tgz] |
---|---|---|
author | Amin Hassani <[email protected]> | Mon Feb 08 17:09:26 2021 |
committer | Commit Bot <[email protected]> | Tue Feb 09 05:11:42 2021 |
tree | 648ec25675b4aac44a09ea582aad31e400aada47 | |
parent | 183315eecfd9719b1b34c0e20fe6d976f37fc2d8 [diff] |
nebraska: Make runtime files creation atomic Users of nebraska look for the existence of the port and pid files and then read their content. If they read the content after the file(s) are created but before they are written into, then problems can occur. In this CL we first create partial files and then move them into their final locations atomically. BUG=b:179329819 TEST=./nebraska.py --runtime-root /tmp --log-file stdout Change-Id: I6bf5307b68017657451e912b5517e36988d33c8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2681308 Tested-by: Amin Hassani <[email protected]> Reviewed-by: Jae Hoon Kim <[email protected]> Commit-Queue: Amin Hassani <[email protected]>