Closed ThomasWaldmann closed 7 years ago
Thanks for the report! Cleaning this up properly could use some refactoring, I'll see what I can do.
great it is fixed.
it is a bit of a pity that such xattr code is not managed centrally and for all platforms in the stdlib. so everybody has to fall into same pitfalls and every implementation has its own drawbacks.
if between 1 and 3 the xattr list changes in the filesystem, the call fails.
at other places in the code I've seen a while loop for such cases.
BTW, I was looking at your code because we just had such a race condition in our code, discovered in the wild, in practical use. (borgbackup has xattr code for linux, freebsd, osx).