"Sergey Poznyakoff" <[EMAIL PROTECTED]> writes:
> OK, I just thought, however, that readdir itself is not required
> to preserve the value of errno in case of succesful return.
That's correct. It must preserve errno only if it returns NULL at
the end of the directory.
> In general, it seems a b
"Dmitry V. Levin" <[EMAIL PROTECTED]> writes:
> if errno is used to test for readdir() errors like in this example,
> then errno should be cleared before each readdir() call, not just
> before first one.
Yes, and the patch I installed yesterday to savedir.c does just that.
> Similar issue exists
"Sergey Poznyakoff" <[EMAIL PROTECTED]> wrote:
> Paul Eggert <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the diagnosis, but the fix isn't quite right in general,
> > since the C standard says memcpy can set errno as well.
> >
> > I installed this patch instead, both in gnulib and coreutils.
>
> O
Joerg Schilling <[EMAIL PROTECTED]> wrote:
> If you look at errno values, there must be a strange bug in GNU tar.
In gnulib, to be precise.
> Why should a preserved errno be relevent in case the high level function
> does not fail?
In my opinion, it should not.
Regards,
Sergey
_
Paul Eggert <[EMAIL PROTECTED]> wrote:
> Thanks for the diagnosis, but the fix isn't quite right in general,
> since the C standard says memcpy can set errno as well.
>
> I installed this patch instead, both in gnulib and coreutils.
OK, I just thought, however, that readdir itself is not require