emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#36163: closed (27.0.50; `list-processes' assumes `


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#36163: closed (27.0.50; `list-processes' assumes `thread-name' cannot return nil)
Date: Tue, 11 Jun 2019 15:27:03 +0000

Your message dated Tue, 11 Jun 2019 08:26:23 -0700
with message-id <address@hidden>
and subject line 27.0.50; `list-processes' assumes `thread-name' cannot return 
nil
has caused the debbugs.gnu.org bug report #36163,
regarding 27.0.50; `list-processes' assumes `thread-name' cannot return nil
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
36163: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36163
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; `list-processes' assumes `thread-name' cannot return nil Date: Tue, 11 Jun 2019 07:03:41 +0000
In emacs -Q, run:

(make-thread (lambda ()
           (make-process :name "name" :command (list "/bin/sh" "-c"
"while true; do sleep 1; done"))
           (while t
         (thread-yield))))

Then use M-x list-processes. This results in an error as (thread-name
thread) returns nil for the thread, since the optional name argument to
make-thread hasn't been specified.

The attached patch fixes things.

diff --git a/lisp/simple.el b/lisp/simple.el
index 6bc3bc5304..cf537265bd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4102,7 +4102,8 @@ list-processes--refresh
                       (null (process-thread p))
                       (not (fboundp 'thread-name))) "--")
                     ((eq (process-thread p) main-thread) "Main")
-                    ((thread-name (process-thread p)))))
+                    ((thread-name (process-thread p)))
+                    (t "--")))
                  (cmd
                   (if (memq type '(network serial))
                       (let ((contact (process-contact p t)))

Attachment: emacs-patch.diff
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: 27.0.50; `list-processes' assumes `thread-name' cannot return nil Date: Tue, 11 Jun 2019 08:26:23 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
Thanks, I installed that patch.



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]