GNU bug report logs - #43202
list-processes--refresh Wrong type argument

Previous Next

Package: emacs;

Reported by: dick.r.chiang <at> gmail.com

Date: Fri, 4 Sep 2020 13:02:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: dick.r.chiang <at> gmail.com
To: 43202 <at> debbugs.gnu.org
Subject: bug#43202: patch
Date: Fri, 04 Sep 2020 09:01:08 -0400
[0001-Squashed-commit-of-the-following.patch (text/x-diff, inline)]
From 50446fc44e54a989db0863b5c8c887043e1226f9 Mon Sep 17 00:00:00 2001
From: dickmao <none>
Date: Fri, 4 Sep 2020 08:57:58 -0400
Subject: [PATCH] Squashed commit of the following:

commit 4ceb578a9c9a93ea44f61e7453aae5b8c2ed90e6
Author: dickmao <none>
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





This bug report was last modified 4 years and 262 days ago.

Previous Next


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