cant cancel Issues
Jeffrey M. Vinocur
jeff at litech.org
Thu Feb 7 08:01:57 UTC 2002
On Thu, 7 Feb 2002, Katsuhiro Kondou wrote:
> In article <Pine.LNX.4.33.0202070015520.12161-100000 at marduk.litech.org>,
> "Jeffrey M. Vinocur" <jeff at litech.org> wrote;
>
> } I still get cant cancel errors, with SMerrno set to zero.
>
> Then, there is still unknown case that we can imagine.
> Can you examine errno when the problem happens?
It's hard to debug, because (without generating fake cancels) it is hard
to know when it is going to happen.
But further examination of the code makes me wonder if you diagnosed the
problem exactly right but didn't get the entire fix -- there is another
unlink() after the loop which it seems to me (I have never looked at the
tradspool code until this problem) might also fail similarly. So the
whole patch would be:
linkpath = NEW(char, strlen(innconf->patharticles) + strlen(ng) + 32);
sprintf(linkpath, "%s/%s/%lu", innconf->patharticles, ng, artnum);
- /* hmm, do we want to abort this if one of the symlink unlinks fails? */
- if (unlink(linkpath) < 0) result = FALSE;
+ /* repeated unlinkings of a crossposted article may fail on account
+ of the file no longer existing without it truly being an error */
+ if (unlink(linkpath) < 0)
+ if (errno != ENOENT || i == 1)
+ result = FALSE;
DISPOSE(linkpath);
}
- if (unlink(path) < 0) result = FALSE;
+ if (unlink(path) < 0)
+ if (errno != ENOENT || numxrefs == 1)
+ result = FALSE;
DISPOSE(path);
for (i = 0 ; i < numxrefs ; ++i) DISPOSE(xrefs[i]);
DISPOSE(xrefs);
Does this make sense to you? I will see if it works.
--
Jeffrey M. Vinocur
jeff at litech.org
More information about the inn-workers
mailing list