From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: block_input for some APIs Date: Mon, 12 Dec 2016 16:48:53 -0500 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 1481579397 13498 195.159.176.226 (12 Dec 2016 21:49:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 21:49:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 22:49:50 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 1cGYTl-00021r-Qx for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 22:49:49 +0100 Original-Received: from localhost ([::1]:33732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGYTp-0005Nq-VH for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 16:49:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGYT7-0005Nh-CZ for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:49:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGYT4-0003I2-D8 for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:49:09 -0500 Original-Received: from [195.159.176.226] (port=58471 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGYT4-0003Hp-70 for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:49:06 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cGYSv-0002Yy-AL for emacs-devel@gnu.org; Mon, 12 Dec 2016 22:48:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:pUawrq2pyu/T3ZiLX6lbXNgHAJU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:210376 Archived-At: >> 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. Stefan