From: Markus Triska <triska@metalevel.at>
To: 33747@debbugs.gnu.org
Subject: bug#33747: 26.1; process-send-string exceeds max-specpdl-size
Date: Fri, 14 Dec 2018 18:49:09 +0100 [thread overview]
Message-ID: <87bm5o2e3u.fsf@metalevel.at> (raw)
To reproduce this issue, please install the PostScript viewer
Ghostscript ("gs"), and put the following forms in "pipe.el":
(setq target (start-process "gs" nil "gs" "-g100x100")
source (start-process "bash" nil "bash"
"-c" "while true; do echo \
rand 2 31 exp div setgray 0 0 100 100 rectfill; done"))
(set-process-filter source 'send-to-target)
(defun send-to-target (proc str)
(process-send-string target str))
When you then invoke Emacs via:
$ emacs -Q pipe.el --eval '(eval-buffer)'
you get almost instantly:
error in process filter: Variable binding depth exceeds max-specpdl-size
The reason for this seems to be that process-send-string also builds up
frames for unwind-protect when it waits for input if the queue is full.
However, in this concrete case, I would prefer to simply send (or queue)
the string and *not* wait for any input within the process filter.
Is there a way to accomplish this? Alternatively, would you please
consider to provide such a mechanism?
For example, when sending output to a process and the output queue of
that process is full, would it be admissible or even preferable to wait
only for input of that specific process, instead of also waiting for and
handling input from other processes (as seems to be the case now)?
Thank you and all the best!
Markus
In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
of 2018-11-18 built on debian
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9.6 (stretch)
next reply other threads:[~2018-12-14 17:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 17:49 Markus Triska [this message]
2018-12-14 18:40 ` bug#33747: 26.1; process-send-string exceeds max-specpdl-size Eli Zaretskii
2018-12-14 18:50 ` Markus Triska
2018-12-14 19:54 ` Eli Zaretskii
2018-12-14 21:23 ` Markus Triska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bm5o2e3u.fsf@metalevel.at \
--to=triska@metalevel.at \
--cc=33747@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).