Thomas Hood wrote:
> On 25/05/11 14:46, Simon Kelley wrote:
>> cp file file.new
>> mv file.new file
>>
>> has the desired effect and atomically changes the mtime without a race
>> window where the contents of file may be invalid.
> 
> 
> The current code (i.e., in my first patch) doesn't suffer from a race
> because it acts upon a temporary file before the latter is mv'ed
> (atomically) to the active name.

True, there was an implied "so it's better than mv file file.new; cp
file.new file" which was my first attempt.

> 
> I was thinking about this issue last night and had the idea of just
> checking the time before writing the temporary file.  This could be
> done with "date", I realize, but can also be done with bash's printf,
> as in the attached patch, which is a bit shorter than the previous one.


That looks good. I'll push it into the next release. Do you have a
burning desire to have a new Debian package of 2.57, or can this wait
until dnsmasq 2.58 comes out?


Cheers,

Simon.

> 




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to