bug-gnulib
[Top][All Lists]
Advanced

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

copy_file_preserving variant that doesn't exit on error?


From: Reuben Thomas
Subject: copy_file_preserving variant that doesn't exit on error?
Date: Sun, 24 Jul 2011 21:05:40 +0100

I just came across the copy-file module, which does exactly what I
want (it is even geared to making backup files), but (unfortunately
for use in an interactive program) exits on error.

I was just wondering what the rationale for this is, rather than
returning an error code. Even in a non-interactive program, this
breaks the usual convention that I/O operations return error codes
rather than exiting on failure. The one advantage I see of the current
approach is the detailed error messages (which in any case I'd like,
for interactive use, to suppress).

For my purposes, a version in which each call of error instead
returned -1 would be fine; is there some gnulib convention that
naturally supports this sort of dual? Or any other suggestions on how
I go about adding it?

-- 
http://rrt.sc3d.org



reply via email to

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