Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.com!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.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'python': 0.08; 'subject:()': 0.09; 'converting': 0.15; 'cc:addr:python-list': 0.15; 'bieber': 0.16; 'subject:Killing': 0.16; 'subject:threads': 0.16; '\xe9crit': 0.16; 'operations.': 0.18; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'complete,': 0.23; 'cc:2**0': 0.25; 'lee': 0.28; 'cc:addr:python.org': 0.29; 'threads': 0.30; 'objects': 0.32; 'received:209.85.214': 0.32; 'thanks': 0.32; 'message-id:@gmail.com': 0.33; 'header:User- Agent:1': 0.33; 'rather': 0.34; 'stuck': 0.34; 'running': 0.35; "i'll": 0.35; 'thread': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.38; 'think': 0.38; "i'd": 0.39; 'ok,': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'quick': 0.60; 'course,': 0.61; 'waiting': 0.62; 'dennis': 0.73; 'to:none': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:newsgroups:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6DbSsUoJf6Vvd2I/kBEHc41a0GMj3cW+8WcUDPIrupQ=; b=gknEwlBQWUvVLfCHbd39TQ6dVLohzuKjk3j9RhP7FtCDykLIQrdUqU3vBDU8PBipl8 KJ/hyeMoozOFck6Dybsl4B1YXSxLvaleJKuh8OWVkQ2L8RW/owFq2oS2btBvZcIxJ5wB HxjQNCMaAvmcncd6aNMB7lkCA8r6WHUUzEnxU= Date: Tue, 31 Jan 2012 18:18:28 +0100 From: Laurent Claessens User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 Newsgroups: comp.lang.python CC: python-list@python.org Subject: Re: Killing threads, and os.system() References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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: , Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328030307 news.xs4all.nl 6871 [2001:888:2000:d::a6]:46454 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19650 Le 31/01/2012 17:04, Dennis Lee Bieber a écrit : > Of course, if that thread is stuck waiting for a call to os.system() > to complete, then it can not do anything... > > os.system() is a rather limited, restrictive, call -- best used for > quick one-of operations. If running Python 2.6+, I'd recommend > converting from os.system() to subprocess.Popen(). .Popen() objects now > have .terminate() and .kill() methods. Ok, I'll try that Popen. Indeed I think that my threads are stuck waiting os.system to complete. Thanks Laurent