Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:file': 0.07; 'subject:How': 0.09; 'created,': 0.09; 'expected.': 0.09; 'received:184.172': 0.09; 'throw': 0.09; 'slightly': 0.15; '12:59': 0.16; 'descriptor,': 0.16; 'posix': 0.16; 'wrote:': 0.17; 'error.': 0.21; 'anonymous': 0.22; 'from:addr:chris': 0.22; 'unix/linux': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'handling': 0.27; 'probably': 0.29; "i'm": 0.29; 'towards': 0.32; 'file': 0.32; 'to:addr:python-list': 0.33; 'likely': 0.33; 'exist': 0.35; 'community': 0.35; 'open': 0.35; 'pm,': 0.35; 'there': 0.35; 'but': 0.36; "i'll": 0.36; 'should': 0.36; 'bad': 0.37; 'moment': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'days': 0.60; 'received:216': 0.62; 'close': 0.63; 'received:67.18': 0.65; 'saving': 0.72; 'lean': 0.84; 'subject:status': 0.84 Date: Fri, 13 Jul 2012 15:15:13 -0500 From: Chris Gonnerman User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: RE: How to safely maintain a status file References: <4FF9F454.40207@shopzeus.com> <4ffecef4$0$6877$e4fe514c@news2.news.xs4all.nl> <4FFF0CB7.3030007@shopzeus.com> <4fff926b$0$29965$c3e8da3$5496439d@news.astraweb.com> <62e90523-a160-4e28-8109-9ce32d8952e1@googlegroups.com> <5B80DD153D7D744689F57F4FB69AF474165560E7@SCACMX008.exchad.jpmchase.net> <50005A96.3010305@gonnerman.org> <5B80DD153D7D744689F57F4FB69AF474165562E0@SCACMX008.exchad.jpmchase.net> In-Reply-To: <5B80DD153D7D744689F57F4FB69AF474165562E0@SCACMX008.exchad.jpmchase.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator191.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gonnerman.org X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([10.0.0.20]) [216.146.253.37]:35569 X-Source-Auth: chris@newcenturycomputers.net X-Email-Count: 5 X-Source-Cap: bmV3Y2VudDtuZXdjZW50O2dhdG9yMTkxLmhvc3RnYXRvci5jb20= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342210874 news.xs4all.nl 6871 [2001:888:2000:d::a6]:60530 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25288 On 07/13/2012 12:59 PM, Prasad, Ramit wrote: > I lean slightly towards the POSIX handling with the addition that any > additional write should throw an error. You are now saving to a file > that will not exist the moment you close it and that is probably not > expected. Ramit But if I created, then deleted it while holding an open file descriptor, it is entirely likely that I intend to write to it. I'll admit, these days there are those in the Unix/Linux community that consider using an anonymous file a bad idea; I'm just not one of them. -- Chris.