Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.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.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:file': 0.07; 'cc:addr:python-list': 0.10; 'general.': 0.16; 'guess.': 0.16; 'wrote:': 0.16; 'skip': 0.18; '(or': 0.21; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'am,': 0.23; '2015': 0.23; 'header:In- Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.28; 'subject:/': 0.29; 'sure,': 0.29; 'function': 0.30; 'problem': 0.33; 'received:google.com': 0.34; 'but': 0.36; "didn't": 0.37; 'subject:: ': 0.37; 'tue,': 0.38; 'high': 0.62; 'matter': 0.63; 'choose': 0.68; 'subject: & ': 0.73; 'upper': 0.76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gBgcJF4gnj/BdZdcZztaMi+pBaGfVmt20rmA7gGeYwk=; b=Sfo5yKAaD7isgw4heYkwVlEgNWrawfYE3EB0avzPGUL2W/sH2+MxC763UWRv1KhKUn 86rDwOxgqVZoK8UBjHdVjA01jp2EMQVVX39vs6ZGsyKPFWlA4o/Y5AsZrL57ddFEO6Zc vdDP/U/Pe6jBu8TtdK8dgKt70wktZRcOtrwEc4SrUamY1qtVHmtfw46QUoyDK+uopjuS /kmRRbAkSuiQkl1no4dUZ984Gfo/GEbE/y+2t6tvJKOEGEZTNT9+XdCuXJjdw/m7psPo 1j+UpRli9fRrPVWK6kQ/UZbRc28uR+xTMM1l/xAxN+8DhW2GBxFUuI1xIp5pYNigBA4q JGLQ== MIME-Version: 1.0 X-Received: by 10.202.239.138 with SMTP id n132mr9803209oih.99.1433259738711; Tue, 02 Jun 2015 08:42:18 -0700 (PDT) In-Reply-To: <87lhg26sfx.fsf@elektro.pacujo.net> References: <87lhg26sfx.fsf@elektro.pacujo.net> Date: Tue, 2 Jun 2015 10:42:18 -0500 Subject: Re: fork/exec & close file descriptors From: Skip Montanaro To: Marko Rauhamaa Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433259746 news.xs4all.nl 2884 [2001:888:2000:d::a6]:35341 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3319 X-Received-Body-CRC: 2454107046 Xref: csiph.com comp.lang.python:91851 On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa wrote: > > The only problem is that you don't know how high you need to go in > general. Sure, but I didn't know anyway, so no matter what upper bound I choose (or what function I choose/implement), it's just going to be a guess. os.closerange just codifies the straightforward procedure. Skip