all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: michael.albinus@gmx.de, 65590@debbugs.gnu.org
Subject: bug#65590: 29.0.50; esh-var-test/interp-concat-cmd fails on macOS
Date: Wed, 13 Sep 2023 11:54:00 -0700	[thread overview]
Message-ID: <c990d3a7-918d-2743-80a8-7ba86154e021@gmail.com> (raw)
In-Reply-To: <CADwFkm=gP4T+JbKPWpzJQdFr6iWUVxaJYrwsoeUNC63201hk+w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

On 9/13/2023 9:10 AM, Stefan Kangas wrote:
> Sorry for the slow turnaround time.
> 
> I'm currently seeing these test failures on master: [snip]
Thanks for the logs. Could you try the attached patch to see if it 
improves things?

[-- Attachment #2: 0001-When-waiting-for-processes-in-Eshell-wait-until-all-.patch --]
[-- Type: text/plain, Size: 1779 bytes --]

From 26b8f18dbff1ccbf0d6c91b7208cb0a4c6d73e4c Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Wed, 13 Sep 2023 11:50:39 -0700
Subject: [PATCH] When waiting for processes in Eshell, wait until all the I/O
 is complete

* lisp/eshell/esh-proc.el (eshell-sentinel): Set ':eshell-handles' to
nil when finished with I/O.
(eshell-wait-for-process): Wait until ':eshell-handles' is nil.
---
 lisp/eshell/esh-proc.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 5df68947ec2..afd0ed80132 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -161,7 +161,11 @@ eshell-wait-for-process
   "Wait until PROCS have successfully completed."
   (dolist (proc procs)
     (when (eshell-processp proc)
-      (while (process-live-p proc)
+      (while (or (process-live-p proc)
+                 ;; If we have handles, this is an Eshell-managed
+                 ;; process.  Wait until we're 100% done and have
+                 ;; cleared out the handles (see `eshell-sentinel').
+                 (process-get proc :eshell-handles))
         (when (input-pending-p)
           (discard-input))
         (sit-for eshell-process-wait-seconds
@@ -530,6 +534,9 @@ eshell-sentinel
                            status
                            (when status (list 'quote (= status 0)))
                            handles)
+                          ;; Clear the handles to mark that we're 100%
+                          ;; finished with the I/O for this process.
+                          (process-put proc :eshell-handles nil)
                           (eshell-debug-command
                            'process
                            (format-message
-- 
2.25.1


  reply	other threads:[~2023-09-13 18:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  6:44 bug#65590: 29.0.50; esh-var-test/interp-concat-cmd fails on macOS Stefan Kangas
2023-08-29 17:10 ` Jim Porter
2023-08-29 18:59   ` Stefan Kangas
2023-08-29 19:15     ` Stefan Kangas
2023-08-30  0:44     ` Jim Porter
2023-09-01  1:54       ` Jim Porter
2023-09-01 16:03         ` Stefan Kangas
2023-09-01 16:30           ` Jim Porter
2023-09-01 17:00             ` Jim Porter
2023-09-12 18:53               ` Jim Porter
2023-09-13 16:10                 ` Stefan Kangas
2023-09-13 18:54                   ` Jim Porter [this message]
2023-09-13 20:34                     ` Stefan Kangas
2023-09-13 20:41                       ` Jim Porter
2023-09-13 20:48                         ` Stefan Kangas
2023-09-13 21:10                           ` bug#65590: bug#65602: 30.0.50; eshell-test/{elisp,subcommand}-reset-in-pipeline fails intermittently " Stefan Kangas
2023-09-13 21:33                             ` Stefan Kangas
2023-09-14  1:24                               ` Jim Porter
2023-09-14 19:14                                 ` Stefan Kangas
2023-09-14 19:33                                   ` Jim Porter
2023-09-15  0:59                                     ` Jim Porter
2023-09-15 12:14                                       ` Stefan Kangas
2023-09-18 17:30                                         ` Jim Porter
2023-09-13 21:13                         ` bug#65590: " Stefan Kangas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c990d3a7-918d-2743-80a8-7ba86154e021@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=65590@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=stefankangas@gmail.com \
    /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 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.