GNU bug report logs - #36163
27.0.50; `list-processes' assumes `thread-name' cannot return nil

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Tue, 11 Jun 2019 07:05:02 UTC

Severity: normal

Fixed in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36163 in the body.
You can then email your comments to 36163 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36163; Package emacs. (Tue, 11 Jun 2019 07:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pip Cet <pipcet <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 11 Jun 2019 07:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; `list-processes' assumes `thread-name' cannot return nil
Date: Tue, 11 Jun 2019 07:03:41 +0000
[Message part 1 (text/plain, inline)]
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)))
[emacs-patch.diff (text/x-patch, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 11 Jun 2019 15:27:03 GMT) Full text and rfc822 format available.

Notification sent to Pip Cet <pipcet <at> gmail.com>:
bug acknowledged by developer. (Tue, 11 Jun 2019 15:27:03 GMT) Full text and rfc822 format available.

Message #10 received at 36163-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pip Cet <pipcet <at> gmail.com>
Cc: 36163-done <at> debbugs.gnu.org
Subject: 27.0.50; `list-processes' assumes `thread-name' cannot return nil
Date: Tue, 11 Jun 2019 08:26:23 -0700
Thanks, I installed that patch.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Jul 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 349 days ago.

Previous Next


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