[ale] [OT] how do I monitor the "weather" in my computer room

Alex Carver agcarver+ale at acarver.net
Fri Jun 7 10:34:49 EDT 2013


Right, move is better than copy of course.  I was on autopilot since I 
do all scratchwork in /tmp and copy before destroying the /tmp just in 
case.  Of course on my system /tmp and /var are on different partitions 
so it doesn't matter anyway. :)

On 6/7/2013 05:24, Michael Trausch wrote:
> Of course remember that such atomic semantics are only ensured when moving
> a file and when both the source and destination are on the same file
> system.
> On Jun 7, 2013 8:20 AM, "Phil Turmel" <philip at turmel.org> wrote:
>
>> On 06/07/2013 01:48 AM, Alex Carver wrote:
>>>> D) Sometimes, if I happen to retrieve the file while it's being written,
>>>> I get an incomplete result.
>>>
>>> This would be an expected flaw in the implementation with almost any web
>>> server.  You would have to create a temporary file first, then at the
>>> last moment copy the temporary file to the permanent location (since the
>>> copy will be fast versus the writing of several command outputs).  The
>>> only true way to avoid this is with CGI scripting to execute the script
>>> at time of request.
>>
>> Short of CGI, the canonical way to handle this is to *rename* a
>> temporary file over the normal file.  The linux kernel will guarantee
>> that other processes will see either old or new in their entirety.
>>
>> Phil
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



More information about the Ale mailing list