all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33747: 26.1; process-send-string exceeds max-specpdl-size
@ 2018-12-14 17:49 Markus Triska
  2018-12-14 18:40 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Triska @ 2018-12-14 17:49 UTC (permalink / raw)
  To: 33747


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)






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-14 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14 17:49 bug#33747: 26.1; process-send-string exceeds max-specpdl-size Markus Triska
2018-12-14 18:40 ` Eli Zaretskii
2018-12-14 18:50   ` Markus Triska
2018-12-14 19:54     ` Eli Zaretskii
2018-12-14 21:23       ` Markus Triska

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.