From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19312 invoked by alias); 8 Apr 2013 18:34:42 -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 19300 invoked by uid 89); 8 Apr 2013 18:34:42 -0000 X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Apr 2013 18:34:40 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38IYdr8000421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Apr 2013 14:34:39 -0400 Received: from host2.jankratochvil.net (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r38IYZWK004169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 8 Apr 2013 14:34:38 -0400 Date: Tue, 09 Apr 2013 08:21:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Avoid potencially-stale errno usage (was: Re: Include putpkt in TRY_CATCH. PR gdb/15275) Message-ID: <20130408183434.GA32515@host2.jankratochvil.net> References: <20130325195832.GA15218@host2.jankratochvil.net> <515478BE.3030801@redhat.com> <51630502.3050109@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51630502.3050109@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-04/txt/msg00202.txt.bz2 On Mon, 08 Apr 2013 19:57:22 +0200, Pedro Alves wrote: > @@ -7048,14 +7065,11 @@ readchar (int timeout) > switch ((enum serial_rc) ch) > { > case SERIAL_EOF: > - remote_unpush_target (); > - throw_error (TARGET_CLOSE_ERROR, _("Remote connection closed")); > + unpush_and_perror (_("Remote connection closed")); I do not see why you have changed this part. I have checked SERIAL_EOF is returned in cases where errno is not set (errno is unchanged). Otherwise it looks OK to me. Thanks, Jan