]> git.eshelyaron.com Git - emacs.git/commitdiff
Increase probability that a process test succeeds.
authorPhilipp Stephani <phst@google.com>
Sun, 10 Jan 2021 09:14:27 +0000 (10:14 +0100)
committerPhilipp Stephani <phst@google.com>
Sun, 10 Jan 2021 09:14:27 +0000 (10:14 +0100)
* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-process): Work around
potential Emacs bug.

test/src/process-tests.el

index ca98f54bdb1fedee11c0ceaa40063a0cacf69baf..921bcd5f85b22e35aa6d54f34a1c6ac09cea596a 100644 (file)
@@ -565,6 +565,11 @@ FD_SETSIZE file descriptors (Bug#24325)."
                 (should (memq (process-status process) '(run exit)))
                 (when (process-live-p process)
                   (process-send-eof process))
+                ;; FIXME: This `sleep-for' shouldn't be needed.  It
+                ;; indicates a bug in Emacs; perhaps SIGCHLD is
+                ;; received in parallel with `accept-process-output',
+                ;; causing the latter to hang.
+                (sleep-for 0.1)
                 (while (accept-process-output process))
                 (should (eq (process-status process) 'exit))
                 ;; If there's an error between fork and exec, Emacs