From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33747: 26.1; process-send-string exceeds max-specpdl-size Date: Fri, 14 Dec 2018 21:54:48 +0200 Message-ID: <83mup7g9yv.fsf@gnu.org> References: <87bm5o2e3u.fsf@metalevel.at> <83o99oeyuz.fsf@gnu.org> <874lbgeydc.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1544817254 5693 195.159.176.226 (14 Dec 2018 19:54:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2018 19:54:14 +0000 (UTC) Cc: 33747@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 14 20:54:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1gXtXF-0001OB-A7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 20:54:10 +0100 Original-Received: from localhost ([::1]:35198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXtZM-0004jG-3u for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 14:56:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXtZC-0004i8-IM for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 14:56:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXtZ6-0005K3-6z for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 14:56:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXtZ4-0005JA-9l for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 14:56:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gXtZ4-0008SX-53 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 14:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Dec 2018 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33747-submit@debbugs.gnu.org id=B33747.154481730232429 (code B ref 33747); Fri, 14 Dec 2018 19:56:02 +0000 Original-Received: (at 33747) by debbugs.gnu.org; 14 Dec 2018 19:55:02 +0000 Original-Received: from localhost ([127.0.0.1]:48577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXtY6-0008Qz-4b for submit@debbugs.gnu.org; Fri, 14 Dec 2018 14:55:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXtY4-0008QN-Qm for 33747@debbugs.gnu.org; Fri, 14 Dec 2018 14:55:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXtXv-0004dC-NB for 33747@debbugs.gnu.org; Fri, 14 Dec 2018 14:54:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXtXv-0004d5-9U; Fri, 14 Dec 2018 14:54:51 -0500 Original-Received: from [176.228.60.248] (port=4986 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gXtXv-0004u4-1J; Fri, 14 Dec 2018 14:54:51 -0500 In-reply-to: <874lbgeydc.fsf@metalevel.at> (message from Markus Triska on Fri, 14 Dec 2018 19:50:39 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153460 Archived-At: > From: Markus Triska > Cc: 33747@debbugs.gnu.org > Date: Fri, 14 Dec 2018 19:50:39 +0100 > > Eli Zaretskii writes: > > > AFAIK, process-send-string is a blocking function: it cannot return > > before the entire string was sent. > > Yes indeed. However, the C function send_process internally calls > wait_reading_process_output That's so as not to wedge the entire session. Communications with async subprocesses aren't supposed to stop everything in its tracks. > and this may again invoke the filter! In general, calling APIs that could take a long time from a process filter is not a very good idea, btw. Remember that process filters are run when Emacs is idle, so when you call an API that could take a long time, you make Emacs less responsive. And then there's the infinite recursion case that you hit. > What I find surprising is that this call of > wait_reading_process_output is not limited to the process whose > output queue is full, i.e., the one for which process-send-string > was actually invoked. I don't see any reason why it should only wait for output from the same process. Once again, this is Emacs's way to wait without stopping everything else, so waiting for input from any source makes perfect sense to me.