"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 bad idea to check errno without knowing which
> call might have changed it.

Yes and no.  The current savedir propagates failure back to its
caller.  The caller doesn't know which system call set errno, but the
errno value that is propagated is the one that corresponds to the
failing system call.  As far as savedir's caller is concerned, it's
savedir that failed.

Or perhaps I'm misunderstanding your point?  Anyway, I don't see any
but in the current savedir with respect to errno handling.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to