From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88240 invoked by alias); 18 Jul 2019 20:09:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88232 invoked by uid 89); 18 Jul 2019 20:09:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=day X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jul 2019 20:09:23 +0000 Received: from [172.16.0.144] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id F34E51EBE5; Thu, 18 Jul 2019 16:09:21 -0400 (EDT) Subject: Re: [PATCH] Fix new-ui tty stream leak To: Pedro Alves , gdb-patches@sourceware.org References: <20190718184124.21907-1-palves@redhat.com> From: Simon Marchi Message-ID: Date: Thu, 18 Jul 2019 20:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190718184124.21907-1-palves@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00442.txt.bz2 On 2019-07-18 2:41 p.m., Pedro Alves wrote: > I noticed that we never close the stream opened by new-ui. > > This fixes it, by adding a new struct ui ctor that takes ownership of > the passed-in stream. Hi Pedro, If I am not mistaken, we never delete the UIs themselves either, so it won't make a difference today, is that right? They just live until the end of the GDB process. Still, I think this patch is fine, in that it makes things right in case we decide to make it possible to close an existing UI some day. Simon