GNU bug report logs - #48118
27.1; 28; Only first process receives output with multiple running processes

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Fri, 30 Apr 2021 13:45:02 UTC

Severity: normal

Tags: fixed

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; 28; Only first process receives output with multiple running
 processes
Date: Fri, 30 Apr 2021 15:44:17 +0200
When running multiple asynchronous processes only the output of the
first process is handled. This happens when the first process
continously produces a huge amount of output, for example when running
`ripgrep` as done by my `consult-ripgrep` command (part of my Consult
package). Then Emacs is stuck handling the output of the first process.
The output of the second process is not read until the first process is
terminated. I expect Emacs to treat the running processes fairly. The
issue also occurs if a :filter function is specified. Both Emacs 27 and
28 are affected.

Minimal reproducible example by @jakanakaevangeli:

(progn
  (setq pa (make-process
             :name "yes-a"
             :command '("yes")
             :connection-type 'pipe
             :buffer (setq a (generate-new-buffer " *a*"))))
  (setq pb (make-process
             :name "yes-b"
             :command '("yes")
             :connection-type 'pipe
             :buffer (setq b (generate-new-buffer " *b*"))))
  (run-at-time
   1 1
   (lambda ()
     (message "size a: %s\nsize b: %s"
              (buffer-size a) (buffer-size b)))))

Original bug discussions:
https://github.com/minad/consult/issues/272
https://github.com/minad/consult/pull/297




This bug report was last modified 3 years and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.