From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: block_input for some APIs Date: Mon, 12 Dec 2016 13:53:33 -0800 Message-ID: References: <831sxdc9hs.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481579688 20223 195.159.176.226 (12 Dec 2016 21:54:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 21:54:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 22:54:42 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGYYT-000412-Ta for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 22:54:42 +0100 Original-Received: from localhost ([::1]:33743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGYYY-0006KF-3i for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 16:54:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGYXy-0006K8-0M for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGYXx-0004Vf-6L for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:54:10 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:36118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGYXw-0004SP-TG for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:54:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=boZpwC7+/0/IrFWs2czlw45XCYAHVjZ+H5hR96hHcbo=; b=q9woPFYML/sgS7KGqzRw5HRgKw3Bhezfo5URq+nvxT/J2pN2Sc2cWWc3+YMB5bKGF6uKnByPs3GnyA80WSYgWBY9igvMMSOz3O5tadJ8eGUUmNoGGm4WOFrCcw/MELAmHgbN+0bFyo2dAQCw+fsi8ryszfF4AqtSmIyxQcW8TGSVwFMuj8AcQcYFE2GN8atlhuSXd2HmvUHxSKou/jSCuJ/txWAxy1xKgPjllgncXt5i1zhdU6unyyctrB3ba2robamXgdzY1pzNZakwUhyboaDg2Akd1EbXuLx4Pa0bYUPYI4Gcf9u4An18tFoKwsrRhPSxmVLyDAv27Zii5NjO4g==; Original-Received: from [2620:0:1008:1101:7d84:5c03:5e28:8df] (helo=thule.roam.corp.google.com) by dancol.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1cGYXT-0005VF-Br; Mon, 12 Dec 2016 13:53:39 -0800 In-Reply-To: (Stefan Monnier's message of "Mon, 12 Dec 2016 16:48:53 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210377 Archived-At: On Mon, Dec 12 2016, Stefan Monnier wrote: >>> Does anyone remember why we block input around calls to functions like >>> getpwnam or tzset or fwrite? >> I think this dates back to when C-g and/or other handlers called >> longjmp. > > I'm not completely sure, but my own impression is that this dates back > to before SYNC_INPUT, i.e. with input became available, we'd get an IO > signal and in the handler we'd run a whole bunch of code, since > reentrance was a big issue. Nowadays we delay this async processing to > the next QUIT so there's no re-entrance issue any more. That said, the existing calls to block_input don't do a lot of harm, so there's no need to remove them.