bug-gnulib
[Top][All Lists]
Advanced

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

Re: copy_file_preserving variant that doesn't exit on error?


From: Bruno Haible
Subject: Re: copy_file_preserving variant that doesn't exit on error?
Date: Thu, 12 Jan 2012 03:17:44 +0100
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Reuben Thomas wrote:
> > errno describes _what_ error occurred. The error message also contains
> > information about _when_ it occurred.
> 
> Actually, the error codes returned by qcopy_file_preserving contain
> all the information about when the error occurred, as you can see in
> copy_file_preserving.

Yes, therefore a separate error-signalling function would have to take
2 arguments (ret, errno), not just one argument (errno) like strerror.

> I was thinking that a gnulib strerror could add support for these error
> messages without the need for extra functions like
> copy_file_preserving

Gnulib's <errno.h> and strerror() function are meant to be as close to
the POSIX definition of these APIs. We don't want to add random error
codes to them, just because 1 module out of 900 modules could make use of it.

Bruno




reply via email to

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