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 22:30:14 +0100 Message-ID: References: <87bls8ojoh.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83y2va3efz.fsf@gnu.org> <83v9qd3a0i.fsf@gnu.org> <83mubp362m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="179635"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38632@debbugs.gnu.org, yantar92@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 18 22:32:14 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 1ihgvW-000kXG-1n for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2019 22:32:14 +0100 Original-Received: from localhost ([::1]:60982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihgvU-0005pB-RM for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2019 16:32:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40734) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihguN-0004wm-FQ for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 16:31:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihguM-0005R3-AV for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 16:31:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihguM-0005Qt-50 for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 16:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihguM-0003FJ-14 for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2019 16:31: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 21:31: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.157670462512414 (code B ref 38632); Wed, 18 Dec 2019 21:31:01 +0000 Original-Received: (at 38632) by debbugs.gnu.org; 18 Dec 2019 21:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:44036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihgtk-0003E9-RO for submit@debbugs.gnu.org; Wed, 18 Dec 2019 16:30:25 -0500 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:34788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihgti-0003Dv-LP for 38632@debbugs.gnu.org; Wed, 18 Dec 2019 16:30:23 -0500 Original-Received: by mail-wr1-f48.google.com with SMTP id t2so3871479wrr.1 for <38632@debbugs.gnu.org>; Wed, 18 Dec 2019 13:30:22 -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:content-transfer-encoding; bh=Q85kKO8bmJAewJV5rggKuZ/C47xDfccRO9YEOu2XoDc=; b=GJdZAcE1kEY9h3RiPZ4KAj9/TVdAXpkfVQ3EK4x35ijjEHsjxGCWuoWoKntuj1JHfK mNsomvE9bwVTGGhEzg2krmJnPj0XE1NvWUjqz4gSpcYa1xJ8Tmv7EfK3QWSTsqKEYbgv ujHf5bi5sK1w3F1LEb06Dn4Y/xmpoBy9+N4Ti9bI9puv+Tt3Pbu93z2HdsK2ZnA6cuNR 1KToAEzKGFWpF4g6/pTwPQBoEvwbPdZUJBaEeEapbCA2Oj3kpJjWoXxklK0FxZvDknj8 7gIJGpRMQa4qF3Jpem43LsoW9TgnaxP23ug+N6AuKDuHQQUaJV6mUP2LXcPk74L6r0ar KDDg== 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 :content-transfer-encoding; bh=Q85kKO8bmJAewJV5rggKuZ/C47xDfccRO9YEOu2XoDc=; b=jtfhGXciQrZaQjgbAxHHttJmo/2lRLOlsEc+qYQPSpmbDzPz0qhAub31JZAvcfKV/t EbI0VNoCeZsMzKqAN4PnsY4ZRviWnwj1Wr7dojkITPSSSwnsps5SAvn4IzXHXmgaO89N yT5DbH6usmEaGWnWEMRmX0jTnFimsz9Z7yt6wPGrludD6ZmP33ZtemWHfR+i0/pBHwSu 09ZnAke8lSqdec7tkoPoAnv1HHDS32gr8n9FmzkHb5RCCQtKpACczJAf5ikzj6cl1Hdh LWxOcF2yhpWUjZfx8rISKfM9fJlGsvKAPyYIZesVYqKKjZZYxosU6QC/ur7uM5XdQlIq fC9g== X-Gm-Message-State: APjAAAVdlluMiKDq8SunD8KZNm0echI6xDPBr3kKoLuCWqOLwDbo/l6i BcjiG+VctVu+SN8g8HimkfM= X-Google-Smtp-Source: APXvYqzjRRGRioCLIkRqO2l8X8CNxdxKM6W/KIxbgDW+shIMAqyg55WwlHy76cHvhlGXiIggpwmCQQ== X-Received: by 2002:adf:fe8c:: with SMTP id l12mr4821362wrr.215.1576704616592; Wed, 18 Dec 2019 13:30:16 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:31d4:e642:d23e:967c]) by smtp.gmail.com with ESMTPSA id 60sm4075997wrn.86.2019.12.18.13.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 13:30:15 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <83mubp362m.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2019 19:18:57 +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:173533 Archived-At: >>>>> On Wed, 18 Dec 2019 19:18:57 +0200, Eli Zaretskii said: >> From: Robert Pluim >> Cc: yantar92@gmail.com, 38632@debbugs.gnu.org >> Date: Wed, 18 Dec 2019 18:04:53 +0100 >>=20 Eli> (Btw, the limitation is 16 bytes, including the terminating null, = so Eli> truncation needs to be clever about non-ASCII characters, and I wo= nder Eli> what does prctl do when 15 bytes end in the middle of a multibyte Eli> sequence.) >>=20 >> It does exactly what you'd expect, it drops the extraneous bytes, so >> putting eg =C3=BC on the boundary results in a name ending in =C3=83= (#xc3). Eli> So it is one more reason to do or own truncation, so we do it righ= t. OK. Is there a useful function that would help for that? I can cook up something based on NEXT_CHAR_BOUNDARY and/or BYTES_BY_CHAR_HEAD, but I=CA= =BCd expect there to be something already. >> In any case, if emacs or prctl truncates, then the name as reported >> by 'list-threads' will be out of sync with pthread_getname_np, unless >> you'd want to adjust that too. Eli> We need to truncate the names we store in the thread object (and Eli> document that). That=CA=BCs the easy part. I=CA=BCm assuming mswindows doesn=CA=BCt truncat= e. Robert