From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87bls8ojoh.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83y2va3efz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="241939"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38632@debbugs.gnu.org, Ihor Radchenko To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 18 10:07:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ihVIU-0010oH-Cu for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2019 10:07:10 +0100 Original-Received: from localhost ([::1]:51504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihVIT-0005zN-7E for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2019 04:07:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihVIN-0005zF-Ff for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 04:07:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihVIM-0003IX-Fx for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 04:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36689) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihVIM-0003HF-C0 for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 04:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihVIM-0001E8-0f for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 04:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2019 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38632 X-GNU-PR-Package: emacs Original-Received: via spool by 38632-submit@debbugs.gnu.org id=B38632.15766599724653 (code B ref 38632); Wed, 18 Dec 2019 09:07:01 +0000 Original-Received: (at 38632) by debbugs.gnu.org; 18 Dec 2019 09:06:12 +0000 Original-Received: from localhost ([127.0.0.1]:42662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihVHX-0001Cz-M6 for submit@debbugs.gnu.org; Wed, 18 Dec 2019 04:06:11 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:40504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihVHS-0001CP-It for 38632@debbugs.gnu.org; Wed, 18 Dec 2019 04:06:10 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id c14so1369105wrn.7 for <38632@debbugs.gnu.org>; Wed, 18 Dec 2019 01:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version; bh=DFu2sGFf2G91Xoxx0XtU6y1LrGi9l9MgMHNmQJe8GM8=; b=bBCEWPtOZpG8A6kQulR0cxFzBBUbJSrOk3dKAOVtSgKGCb0ZiwEX6iG42QsQiTE5Mu tozimzxsv000sgbq8TmQpX+SBzN1rejct6oneil7Exd1mHxrDzPyawn9J90MVJfZrg+Y BPRyiYQQVcLvJBaXV7P7z6oFtpgr9jui4zj1zGxZBn7ooQ8nXKGz5BQv4Gx6iC3T7WQX g8jmfhdrsrdpw0cUol+vRwDwD12+dH6KkxRrF+rX3Rn2HobkJhOC7AqpbB9PfI8V2HAR nPg7SuntyxJQMtHL5JKZoUF64MWAUdrG864VQbGaOc+gnhIupEzLz6BFuMnJ7ipegqNp uwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=DFu2sGFf2G91Xoxx0XtU6y1LrGi9l9MgMHNmQJe8GM8=; b=CCE70mB+PFOpfTU4VI7rvFeTH/MAB+z1uWIEDHrhq4unMB395sPdXc4+ZIuAl/ZuXF 5xUsnqqOkv8rtoOA5UtYlXnCGBuQOjIxxN+HDOgrdMpMTNvPxpTBVZbb6DuRmO+XIC/5 2oltxHVzOs9HzGaK6IaXFrZZolzEXpitHdFe8La1ug3vgDT+eIEtT6vFDRCRSd9NWhYz 5QaTbJFk0dk275p55BQAZ0QI3pdhPJS2U0A18lgQBU+s6YYXzR3jXzXcP3N10eQH5Hdl avj3W1EzrS8JU1rqGNCjNVh7f1j73fa7WNjUxjZf1DTDwe99v/0CfsiSDQzJ1ncndyNR Qh2g== X-Gm-Message-State: APjAAAWQG2Nf6kz1R/sZqujYIhiixoma9+m0TOds+57ITE5QcFlzywza M+uDSirrp8jLTFm97cTL+qI//ipl4Mk= X-Google-Smtp-Source: APXvYqySVMwjeHIOuVe5iRo+rIc7cBsCr/f6H4akj3ea8TvBTdZPGdsTo9rRo8eaGRSQf9T0Jqhlkg== X-Received: by 2002:a5d:670a:: with SMTP id o10mr1552448wru.227.1576659960416; Wed, 18 Dec 2019 01:06:00 -0800 (PST) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id t25sm1691531wmj.19.2019.12.18.01.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 01:05:59 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <83y2va3efz.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Dec 2019 22:05:52 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173513 Archived-At: >>>>> On Tue, 17 Dec 2019 22:05:52 +0200, Eli Zaretskii said: >> From: Ihor Radchenko >> 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