Windows will not delete a file if a handle is still open. Instead it will give "Access denied" exceptions to everything trying to access it until all handles are released and the file gets deleted.
See A File Cannot Be Deleted or Accessed on an NTFS Volume
The retry is not necessary, since the file handle will not be released by tail until the file is closed.
The permission error on windows should be treated as if the file was deleted.
Windows will not delete a file if a handle is still open. Instead it will give "Access denied" exceptions to everything trying to access it until all handles are released and the file gets deleted. See A File Cannot Be Deleted or Accessed on an NTFS Volume
The retry is not necessary, since the file handle will not be released by tail until the file is closed. The permission error on windows should be treated as if the file was deleted.