From 50446fc44e54a989db0863b5c8c887043e1226f9 Mon Sep 17 00:00:00 2001 From: dickmao Date: Fri, 4 Sep 2020 08:57:58 -0400 Subject: [PATCH] Squashed commit of the following: commit 4ceb578a9c9a93ea44f61e7453aae5b8c2ed90e6 Author: dickmao Date: Fri Sep 4 08:55:39 2020 -0400 avoid `Wrong type argument` in `list-processes--refresh` Should not expect sequencep from `process-command` for network, serial, pipe. * lisp/simple.el (list-processes--refresh): network, serial, *or pipe*. * test/src/process-tests.el (process-test-stopped-pipe): add a test. --- lisp/simple.el | 2 +- test/src/process-tests.el | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index eedbff2d08..e7eb33b200 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4374,7 +4374,7 @@ list-processes--refresh ((thread-name (process-thread p))) (t "--"))) (cmd - (if (memq type '(network serial)) + (if (memq type '(network serial pipe)) (let ((contact (process-contact p t t))) (if (eq type 'network) (format "(%s %s)" diff --git a/test/src/process-tests.el b/test/src/process-tests.el index e15ad47f96..c45b00a776 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -105,6 +105,15 @@ process-test-stderr-buffer (goto-char (point-min)) (looking-at "hello stderr!"))))) +(ert-deftest process-test-stopped-pipe () + (skip-unless (executable-find "cat")) + (with-temp-buffer + (let ((proc (make-pipe-process :name "pipe" :buffer (current-buffer) + :command '("cat") :stop t))) + (unwind-protect + (should (list-processes--refresh)) + (delete-process proc))))) + (ert-deftest process-test-stderr-filter () (skip-unless (executable-find "bash")) (let* ((sentinel-called nil) -- 2.26.2