[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [PATCH] Make guess_seekable_archive() preserve the errno v

From: Tetsuo Handa
Subject: Re: [Bug-tar] [PATCH] Make guess_seekable_archive() preserve the errno variable.
Date: Wed, 25 Sep 2013 00:37:45 +0900


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;
                errno = err;
        return open(filename, flags, mode);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]