From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109702 invoked by alias); 1 Jun 2016 13:42:46 -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 109693 invoked by uid 89); 1 Jun 2016 13:42:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 01 Jun 2016 13:42:45 +0000 Received: by mail-pf0-f193.google.com with SMTP id 62so3866809pfd.3 for ; Wed, 01 Jun 2016 06:42:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=RjkSIW44rjXM2VKuUUOMJKA1UUwWRPxFumhDS33q3ds=; b=PfqSN4wUZrDFURTkLQYbg+65u77Mc+sTdgLVTYbhGP88FtcwyZ8G5mmUkiXM59pAQS 6vrwskzY/JQ4fTQquXyuVtARXi1OQAxntJ3qqTNVHDWi7qo/UGMhVr0N+wNjsdlTtl6c Kbyaub6azFsaq9fwBmgGrE6TIYS/HLD8Kx1Xu6Jxtyg659K6SZt01qg5r46edgyBM2TK nbm1W4x9dgJqxnfvNKqdjIY9+E7cCDCA2Kd/+279aLhT06Fufbmn8+Dd3aslqQeRxgOL GoxnijX2gK35D4VrKBIb1HIpVqeBRZqD7IpAnXAAUjTj+/vurbztTPSw1DDyxfdA84rm +CKg== X-Gm-Message-State: ALyK8tIpXqW/qMyL0CASODoGR/d1CeVRRfTlpMWeqmjOO/8KzVs9ZKGYS0rcwQNMekvwoA== X-Received: by 10.98.59.6 with SMTP id i6mr8863011pfa.45.1464788563381; Wed, 01 Jun 2016 06:42:43 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id vi6sm63011092pab.21.2016.06.01.06.42.41 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 01 Jun 2016 06:42:42 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] Wake up interruptible_select in remote_fileio ctrl-c handler References: <1463668660-9205-1-git-send-email-yao.qi@linaro.org> <86lh2pxq6a.fsf@gmail.com> <2102e16d-b52c-82da-6714-c536092dcb01@redhat.com> Date: Wed, 01 Jun 2016 13:42:00 -0000 In-Reply-To: <2102e16d-b52c-82da-6714-c536092dcb01@redhat.com> (Pedro Alves's message of "Wed, 1 Jun 2016 12:52:34 +0100") Message-ID: <864m9dxbxt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00018.txt.bz2 Pedro Alves writes: > Basically, my thinking for the patch was: > > - remote.c no longer installs a custom SIGINT handler. > > - The current remote-fileio.c SIGINT handler is basically the > same as the default SIGINT handler (event-top.c:handle_sigint), > in priciple, except that instead of setting the quit flag, > it sets a separate flag. > > - The current code can lose Ctrl-C -- there's a period > where SIG_IGN is installed as signal handler, for example. > > I think we should be able to completely remove the remote-fileio.c > SIGINT handler, and fix these corner cases, with the patch below. > Yes, that is completely the right way to go. > + > + /* If the user hit C-c before, pretend that it was hit right > + here. */ > + QUIT; Why do we need this? --=20 Yao (=E9=BD=90=E5=B0=A7)