Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion subprocess leaves child living

View parsed - Show only message text

Path: g2news1.google.com!news3.google.com!news.germany.com!feeder.news-service.com!post.news-service.com!news.jay.net!not-for-mail
From: Thomas Dybdahl Ahle <lob...@gmail.com>
Subject: subprocess leaves child living
Newsgroups: comp.lang.python
User-Agent: Pan/0.129 (Benson & Hedges Moscow Gold)
Message-ID: <pan.2007.06.05.11.59.09@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@jay.net
Organization: Jay.net
Date: Tue, 05 Jun 2007 13:58:46 +0200
Lines: 12
NNTP-Posting-Host: 86.48.47.76 (86.48.47.76)
NNTP-Posting-Date: Tue, 05 Jun 2007 13:58:46 +0200
X-Trace: 2175046654ff6f3958ae932442

Hi, When I do a small program like

from subprocess import Popen
popen = Popen(["ping", "google.com"])
from time import sleep
sleep(100)

start it and kill it, the ping process lives on.
Is there a way to ensure that the ping process is always killed when the 
python process is?
I can't use atexit, as ping then isn't killed when python is killed "in 
the hard way"

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google