Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17700

Re: Why does this launch an infinite loop of new processes?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bahamutzero8825@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'cpython': 0.05; 'imports': 0.07; '__name__': 0.09; 'spawn': 0.09; 'received:209.85.210.174': 0.13; 'received:mail-iy0-f174.google.com': 0.13; 'thunderbird': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.22; 'runs': 0.23; 'code': 0.25; 'windows': 0.26; 'import': 0.27; 'module.': 0.29; 'pm,': 0.29; 'again?': 0.30; 'parent': 0.30; 'subject:?': 0.31; 'message-id:@gmail.com': 0.33; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.34; 'anything': 0.34; 'received:192': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'should': 0.39; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'received:192.168': 0.40; 'subject:this': 0.74; 'idiom': 0.84; 'subject:launch': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=TzBhBLYkkNU6BA/obE4zQ6zXs2OGkqj7EGta5r9QUiQ=; b=VMPNcKJey81dBBSbvOvWxmbRZfwRmHSs/QU4+c3MU/8M/EtxrAkiFgEOmj6TCnyzHf qh2mO+gYsidvJ0sMXpxPvmJSRQRcr5a3tGpQujEIk5phdi51bMJ3l5Z7qE7SywduOs47 kUXgX6VQwzgO8EvDFShp/isN9fVokstU9FLu4=
Date Wed, 21 Dec 2011 14:11:03 -0600
From Andrew Berg <bahamutzero8825@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20110922 Thunderbird/7.0
MIME-Version 1.0
To "comp.lang.python" <python-list@python.org>
Subject Re: Why does this launch an infinite loop of new processes?
References <4EF22CA1.1070200@gmail.com> <4EF233A7.6020907@stoneleaf.us>
In-Reply-To <4EF233A7.6020907@stoneleaf.us>
X-Enigmail-Version 1.3.3
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3958.1324498271.27778.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1324498271 news.xs4all.nl 6913 [2001:888:2000:d::a6]:51297
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17700

Show key headers only | View raw


On 12/21/2011 1:29 PM, Ethan Furman wrote:
> Anything that runs at import time should be protected by the `if 
> __name__ == '__main__'` idiom as the children will import the __main__ 
> module.
So the child imports the parent and runs the spawn code again? That
makes sense.

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 7.0

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Why does this launch an infinite loop of new processes? Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-21 14:11 -0600
  Re: Why does this launch an infinite loop of new processes? Hans Mulder <hansmu@xs4all.nl> - 2011-12-22 12:17 +0100

csiph-web