From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32652 invoked by alias); 16 May 2018 17:37:32 -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 32193 invoked by uid 89); 16 May 2018 17:37:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=assurance, Hx-languages-length:633, danger X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.50.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 May 2018 17:37:29 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway24.websitewelcome.com (Postfix) with ESMTP id F29629BEEB for ; Wed, 16 May 2018 12:37:27 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id J0MhfKMo1BcCXJ0MhfGWZx; Wed, 16 May 2018 12:37:27 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:46770 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fJ0Mh-003MCI-Jx; Wed, 16 May 2018 12:37:27 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 02/10] remote: Eliminate remote_hostio_close_cleanup References: <20180516141830.16859-1-palves@redhat.com> <20180516141830.16859-3-palves@redhat.com> Date: Wed, 16 May 2018 17:43:00 -0000 In-Reply-To: <20180516141830.16859-3-palves@redhat.com> (Pedro Alves's message of "Wed, 16 May 2018 15:18:22 +0100") Message-ID: <87wow3h57t.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fJ0Mh-003MCI-Jx X-Source-Sender: 174-29-44-154.hlrn.qwest.net (pokyo) [174.29.44.154]:46770 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-05/txt/msg00359.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> + ~scoped_remote_fd () Pedro> + { Pedro> + if (m_fd != -1) Pedro> + { Pedro> + int remote_errno; Pedro> + remote_hostio_close (find_target_at (process_stratum), Pedro> + m_fd, &remote_errno); The only danger here is if remote_hostio_close can throw. However, this was already a danger (in theory) before the patch -- there is a rule (perhaps unwritten and/or unenforced) that one cannot throw during a "do_cleanups". I didn't look but some assurance that this can't happen would be good to have. Tom