[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-cppi] Re: [PATCH] Add new option --in-place
From: |
Jim Meyering |
Subject: |
[bug-cppi] Re: [PATCH] Add new option --in-place |
Date: |
Thu, 18 Mar 2010 20:38:41 +0100 |
Hi Giuseppe,
Thanks for the heads-up about your post.
http://lists.gnu.org/archive/html/bug-cppi/2010-03/msg00006.html
You seem to have sent that before I subscribed to the list I'd created.
Sorry I missed it:
Quick comments:
I'm not sure this is worth doing, but if it is you'll have
to make a few changes:
- detect any write failure (i.e, don't omit checks for close failure)
- the replacement must be atomic, which means the temporary
file must be on the same file system as the destination (usually
in the same directory), and the final operation is a rename
syscall.
- upon interrupt, the temporary file must be removed
- also report any unlink failure
- handle fclose failure, too -- use gnulib's close_stream function
I hesitated to enumerate that list (may well be incomplete),
because I don't want to give the impression that once you fix
everything it will be acceptable.
I'm really doubtful that adding the required complexity
is worthwhile. Besides, isn't there a simple utility
program that can turn any filter program into an
operate-on-target-file-in-place utility?
- [bug-cppi] Re: [PATCH] Add new option --in-place,
Jim Meyering <=
- [bug-cppi] Re: [PATCH] Add new option --in-place, Giuseppe Scrivano, 2010/03/19
- [bug-cppi] Re: [PATCH] Add new option --in-place, Jim Meyering, 2010/03/20
- [bug-cppi] Re: [PATCH] Add new option --in-place, Pádraig Brady, 2010/03/22
- [bug-cppi] Re: [PATCH] Add new option --in-place, Jim Meyering, 2010/03/21
- [bug-cppi] Re: [PATCH] Add new option --in-place, Pádraig Brady, 2010/03/22
- [bug-cppi] Re: [PATCH] Add new option --in-place, Pádraig Brady, 2010/03/22
- [bug-cppi] Re: [PATCH] Add new option --in-place, Pádraig Brady, 2010/03/22
- [bug-cppi] Re: [PATCH] Add new option --in-place, Eric Blake, 2010/03/23
- [bug-cppi] Re: [PATCH] Add new option --in-place, Pádraig Brady, 2010/03/22
- [bug-cppi] Re: [PATCH] Add new option --in-place, Jim Meyering, 2010/03/23