From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20833 invoked by alias); 29 Jun 2011 20:35:25 -0000 Received: (qmail 20751 invoked by uid 22791); 29 Jun 2011 20:35:22 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 20:35:06 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5TKZ3gE013438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Jun 2011 16:35:03 -0400 Received: from host1.jankratochvil.net ([10.3.113.13]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5TKZ0qp031650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Jun 2011 16:35:02 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p5TKYx0v000651; Wed, 29 Jun 2011 22:34:59 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p5TKYwVO000643; Wed, 29 Jun 2011 22:34:58 +0200 Date: Wed, 29 Jun 2011 20:35:00 -0000 From: Jan Kratochvil To: Chet Ramey Cc: bug-readline@gnu.org, gdb-patches@sourceware.org, Sterling Augustine Subject: Re: [Bug-readline] [readline patch, gdb-7.3?] Avoid free from a signal handler [Re: [PATCH] Make interrupting tab-completion safe.] Message-ID: <20110629203457.GA28353@host1.jankratochvil.net> References: <20110612121158.GA10611@host1.jankratochvil.net> <20110626222146.GA4410@host1.jankratochvil.net> <4E0B2E83.9030202@case.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E0B2E83.9030202@case.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg00469.txt.bz2 On Wed, 29 Jun 2011 15:54:11 +0200, Chet Ramey wrote: > If you feel that you need to make this change for the current version of > gdb, go ahead. OK. It is not a complete fix but hopefully the one people hit the most. I have also seen unreproducible crash(es) on a completion CTRL-C myself. > The big problem is to allow operations that read through the file system > (like completion) to be interrupted without running unsafe functions from > a signal handler. I do not see the problem, readline already does not use SA_RESTART and the application also gets SIGINT passed by _rl_handle_signal so it aborts the completion reading on its own, as GDB does by the QUIT macro. > It does the user no good to keep setting the "I got SIGINT" flag if he's > trying to complete files on a dead or otherwise unreachable file server. The syscall should get EINTR without SA_RESTART. But I admit I may not see the problem now. Thanks, Jan