Re: OT: file operations atomicity

2009-03-18 Thread Andrew Flerchinger
On Wed, Mar 18, 2009 at 2:51 PM, Doug Barton wrote: > My purpose was more to get the OP thinking in terms > of better procedures for an automated process, and to try to point out > that the current behavior of gnupg doesn't seem to be a bug. > > > hth, > > Doug > That's still what I'm confused ab

Re: OT: file operations atomicity

2009-03-18 Thread Doug Barton
Sven Radde wrote: > Hi! > > Andrew Flerchinger schrieb: >>> 1. Use mktemp to safely create a new, unique file >>> 2. Send the decryption output to that file >>> 3. Test if the "real" file exists, and if so unlink it >>> 4. mv $newfile $realfilename >>> >> You're right, I could do that to make

OT: file operations atomicity (was: Re: Re: gpg doesn't fail on target file existing when decrypting)

2009-03-17 Thread Sven Radde
Hi! Andrew Flerchinger schrieb: >> 1. Use mktemp to safely create a new, unique file >> 2. Send the decryption output to that file >> 3. Test if the "real" file exists, and if so unlink it >> 4. mv $newfile $realfilename >> > You're right, I could do that to make my work-around act atomic. Be