Hello. Tetsuo Handa wrote: > It seems to me that open_warn() in tar-1.23-3.el6 package sometimes reports > EUNATCH error. I'm trying to confirm that EUNATCH really came from open() (or > its rmt versions). > It turned out that Talpa kernel module used by Sophos Anti-Virus is returning EUNATCH error to tar upon open().
Since EUNATCH error is a race condition, is there any chance that tar retries open() request if failed with EUNATCH? Something like --retry-open=N option which sets max_retries in the wrapped open() function shown below. int wrapped_open(const char *filename, int flags, int mode) { int i; for (i = 0; i < max_retries; i++) { const int err = errno; const int ret = open(filename, flags, mode); if (ret != EOF || errno != EUNATCH) return ret; sleep(1); errno = err; } return open(filename, flags, mode); }