Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #198
I have been working on the hpc-mirorring, finding edge cases that don´t work. One such case is events to reflect directory removals. I noticed that, as per #198 the events produced by the C for rmdir events (or rm -rf) were not being produced with the correct fileOp field:
when it should have:
on the Python side, you need the both attributes when trying to mirror an rmdir.
So that was one problem. Another problem was that when doing something like "rm -rf" some of the remove events are for directories. The way to create a file removal event with the current API is to provide a NULL pointer to the file status struct. The file status struct normally provides the file type (file, directory link, etc...)
since the removal event doesn't have this information, the API needs to be changed to allow communicating
that the file being removed is a directory. so added rmflags to a whole slew of routines (two or three levels deep.)
So that's the logic for #198... Unfortunately I was working on that in a branch that was originally about #196. I tried cherry-picking off the above to just PR cleanly for #198, but it turned out these patches depend on the earlier ones... so I needed to PR the whole thing.
The rest of these patches are cleanups that try to make the code cleaner, while testing thoughts about #196.
None of them fix it.
My guess as to the real problem is for #196: when we add process cleanup routine, it gets added after posix thread cleanup has occurred. when we try to close a file, it calls posix thread code where those data structures have already been cleaned up.
So what are these patches?