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

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

bug#38632: 27.0.50; Emacs process name is changed permanently upon creat


From: Robert Pluim
Subject: bug#38632: 27.0.50; Emacs process name is changed permanently upon creating a named thread
Date: Wed, 18 Dec 2019 10:05:58 +0100

>>>>> On Tue, 17 Dec 2019 22:05:52 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Ihor Radchenko <yantar92@gmail.com>
    >> Date: Mon, 16 Dec 2019 14:42:38 +0800
    >> 
    >> When I try to create a named thread like
    >> 
    >> (make-thread (lambda () (+ 1 2)) "test-emacs-async")
    >> 
    >> the emacs process gets renamed to "test-emacs-async" even after the
    >> thread returns. Making another thread with different name renames emacs
    >> process again.

    Eli> I think, instead of calling prctl in systhread.c, we should call
    Eli> pthread_set_name_np, and the configure-time test for prctl should be
    Eli> replaced with a test for pthread_set_name_np.

Would it not be easier to call prctl in the context of the created
thread? That way it deals with the name length issues for us:
pthread_setname_np fails if strlen(name) >= 16, wherease prctl
truncates.

Robert





reply via email to

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