From patchwork Wed May 9 01:43:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 8480 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AE99923E42 for ; Wed, 9 May 2012 01:43:15 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5E30BA18490 for ; Wed, 9 May 2012 01:43:15 +0000 (UTC) Received: by gglu1 with SMTP id u1so2439928ggl.11 for ; Tue, 08 May 2012 18:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=0zTEMQed/cVihZ1eVG+8gwKVbuT4wJPopcMRqO+nwSw=; b=cDgFlIFcyBJjQElCFHeVrMLhf5FKRWEmJrDpborylp68hGx7uVg/4WE0XzSj2GAQrl XdTTJjlS/fjRJLhlLyfDvqz5LI5fk44sJPq66lQLiJ5G1NOBp3uCcm8dXSfU6sW6z2Aq 4ZBUi59phCAFBqxZ9uQC0QO4Ees+ykdeGkLFWmlUpQCeyWrmmrLuHtauicyO4mmAJY9l quPtm/h7xK4T0PDEmXvDQMH1G98n3hZvEZYOwLRRl9gRy9q7cPexXkmfdmzHXbdHYsZq 6gRwB9tRBdGXdUFoGuUr81CFVdr0XENr/RCKqLqGu/PCqC2UCBXrj6CSXuQNwFfOvj+C ZKBw== Received: by 10.42.122.76 with SMTP id m12mr271376icr.38.1336527794513; Tue, 08 May 2012 18:43:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp240069ibj; Tue, 8 May 2012 18:43:13 -0700 (PDT) Received: by 10.180.104.137 with SMTP id ge9mr21582311wib.20.1336527792899; Tue, 08 May 2012 18:43:12 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id m18si1308408wee.2.2012.05.08.18.43.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 May 2012 18:43:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SRvvr-00059u-Os for ; Wed, 09 May 2012 01:43:11 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id AF5FAE2C1A for ; Wed, 9 May 2012 01:43:11 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 282 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 282: kill the process talking to the device under test on process exit (Abner Silva) Message-Id: <20120509014311.16404.93610.launchpad@ackee.canonical.com> Date: Wed, 09 May 2012 01:43:11 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15204"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: cde878efcbb74e0654774ca21b2a25de4383efd6 X-Gm-Message-State: ALoCoQn/MfVt9Pn2nQvKTmqM+I2etryencdtkT4fwi3J6jPNg/Iy1/GsbKDOwA5sKD+3qLJG0OFp Merge authors: Abner Silva (abnerf) Related merge proposals: https://code.launchpad.net/~abnerf/lava-dispatcher/lava-dispatcher/+merge/105112 proposed by: Abner Silva (abnerf) review: Approve - Michael Hudson-Doyle (mwhudson) review: Approve - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 282 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Wed 2012-05-09 13:39:33 +1200 message: kill the process talking to the device under test on process exit (Abner Silva) modified: lava_dispatcher/client/master.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/client/master.py' --- lava_dispatcher/client/master.py 2012-05-07 01:54:39 +0000 +++ lava_dispatcher/client/master.py 2012-05-08 18:35:36 +0000 @@ -28,6 +28,7 @@ from tempfile import mkdtemp import time import traceback +import atexit import pexpect import errno @@ -271,11 +272,15 @@ #serial can be slow, races do funny things if you don't increase delay proc.delaybeforesend=1 self.proc = proc + atexit.register(self._close_logging_spawn) @property def master_str(self): return self.device_option("MASTER_STR") + def _close_logging_spawn(self): + self.proc.close(True) + def decompress(self, image_file): for suffix, command in [('.gz', 'gunzip'), ('.xz', 'unxz'),