diff options
author | samc24 <sam.chaturvedi24@gmail.com> | 2019-07-15 16:40:33 -0400 |
---|---|---|
committer | Sameer Chaturvedi <sam.chaturvedi24@gmail.com> | 2019-07-25 09:52:45 -0400 |
commit | d6ea4b4139c5e890acdb99cbcc303c160031a780 (patch) | |
tree | 614af8c8f49ed3b6f34ec2a30a5c7f682b0c6240 /vendor/golang.org/x | |
parent | 7c9095ea1de363f8d76ae246575062755ac9398e (diff) | |
download | podman-d6ea4b4139c5e890acdb99cbcc303c160031a780.tar.gz podman-d6ea4b4139c5e890acdb99cbcc303c160031a780.tar.bz2 podman-d6ea4b4139c5e890acdb99cbcc303c160031a780.zip |
Improved hooks monitoring
...to work for specific edge cases with a simpler solution.
Re-reads hooks directories after any changes are detected by the watchers.
Added monitoring test for adding a different invalid hook to primary directory.
Some issues with prior code:
- ReadDir would stop when it encounters an invalid hook, rather than registering an error but continuing to read the valid hook.
- Wouldn’t account for Rename and Chmod events.
- After doing a mv of the hooks file instead of rm, it would still think the hooks file is in the directory, but it has been moved to another location.
- If a hook file was renamed, it would register the renamed file as a separate hook and not delete the original, so it would then execute the hook twice - once for the renamed file, and once for the original name which it did not delete.
Signed-off-by: samc24 <sam.chaturvedi24@gmail.com>
Diffstat (limited to 'vendor/golang.org/x')
0 files changed, 0 insertions, 0 deletions