From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Wanrong Lin Newsgroups: gmane.emacs.bugs Subject: bug#38079: On Windows tramp hangs after server-start is called Date: Wed, 6 Nov 2019 11:50:59 -0500 Message-ID: <0c0b89e3-ec38-6917-21c3-af35ece4a63f@gmail.com> References: <0bf97a5e-549f-1e8a-4212-5b08ad05f049@gmail.com> <83a799gfbp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215802"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 Cc: 38079@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 06 17:52:12 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 1iSOXT-000u1a-U7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 17:52:12 +0100 Original-Received: from localhost ([::1]:33006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSOXS-0004CV-KN for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 11:52:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39135) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSOXL-00049Y-Jy for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 11:52:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSOXK-0003di-IF for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 11:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSOXK-0003dc-Ff for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 11:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSOXK-0003JM-CF for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2019 11:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wanrong Lin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2019 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38079 X-GNU-PR-Package: emacs Original-Received: via spool by 38079-submit@debbugs.gnu.org id=B38079.157305907412656 (code B ref 38079); Wed, 06 Nov 2019 16:52:02 +0000 Original-Received: (at 38079) by debbugs.gnu.org; 6 Nov 2019 16:51:14 +0000 Original-Received: from localhost ([127.0.0.1]:41174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOWY-0003I4-1j for submit@debbugs.gnu.org; Wed, 06 Nov 2019 11:51:14 -0500 Original-Received: from mail-pf1-f178.google.com ([209.85.210.178]:42441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOWS-0003HZ-SL for 38079@debbugs.gnu.org; Wed, 06 Nov 2019 11:51:12 -0500 Original-Received: by mail-pf1-f178.google.com with SMTP id s5so11092079pfh.9 for <38079@debbugs.gnu.org>; Wed, 06 Nov 2019 08:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=w/eW2pV59Fh0sYhK1FuY2B4W4qGN6qV81Fnz9z22DNA=; b=ibETyjceSXRzt3ZJW4Ox4oCoFD4BqH+Pbg7iju6i1PF7+QTSmvrKp1Eo/EcFiKoW31 iuFoUBRnDpQ+IdKt2/naRO5nhOm91U0DfKsWzwqLPHKAigtQsEzciAhF8At5lJzbr05M 5LMnjFy73IXbNIkYNR1q+m5M5Tl5mq5Vu29X8bV0dSr0ZvsgVU9dWsMoYD5dH25Lkz4E AgzA1BEMgfvrTgf0WMAMmCHXyrqf69+t1baJ1gvHIqYhhDJEdPoVjFN0otPoR+uj65d0 cCpxe9SVYQbv4Bp249SETb1tF8KW6QbUPtc61rEsmr1HcxaijzBhjG1nxzFfJvBkaAyV i0TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=w/eW2pV59Fh0sYhK1FuY2B4W4qGN6qV81Fnz9z22DNA=; b=Q4eC2J3aldt/jAcuUPzlFOOCFR24LB+NbLUNGOBAyNs/YiDHeSzQANYrync45QnUyk bUz99QQkdbgT5foAUGBHkZTGZBlT1tFvtMaB1NbTQhUnD8DKQNfubiEEl58ZzW4cEj4+ Kb1jIqlXIh9yNGE1Y48RSWTT1tI6yNINDZ0WzgzXZR+gGRtwzZjJoJ+dtxtXL9Sa6G3A nFFl89NfyEOSJWEYYo8nIoP1iTziZ+dzRB988KtfdiSoXCrF5E329FEBSDugc0HQY/5x 66CtvPp0GCQNCRnyB+tBIKWhtIr6Hp535GaI6YcHBa07Qlo+ReNeb63QkEgOtLWjM8+C BD9Q== X-Gm-Message-State: APjAAAU+BgvK/rE41EQEGmrCUao+/b9WucZg8MaZgcOOoyyOpn0J0VgL FPpLFVAhIO87w0uBFuCBWgPujldH X-Google-Smtp-Source: APXvYqzMyJw4cZjNsFsgZ32S/kACl2ocheU15lpMUA9sVdmWrsMPllU5TiHUUCtWDAFoNFDF/XvnCQ== X-Received: by 2002:a17:90a:62cc:: with SMTP id k12mr5308776pjs.142.1573059062462; Wed, 06 Nov 2019 08:51:02 -0800 (PST) Original-Received: from [10.81.100.134] ([50.206.120.10]) by smtp.googlemail.com with ESMTPSA id b18sm23108918pfi.157.2019.11.06.08.51.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Nov 2019 08:51:01 -0800 (PST) In-Reply-To: <83a799gfbp.fsf@gnu.org> Content-Language: en-US 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:171032 Archived-At: Yes that can be another way to fix. The downside is we don't know this system-name upper/lower case change will cause any surprises somewhere else. But I don't understand the underlying difficulty to ensure system-name never changes. Thanks for fixing it either way. Warren On 11/6/2019 11:06 AM, Eli Zaretskii wrote: >> From: Wanrong Lin >> Date: Tue, 5 Nov 2019 19:52:59 -0500 >> >> ;; On Windows, after "server-start" is called, somehow (system-name) >> will return lower case host name. If the original >> ;; (system-name) returns upper case host name now >> tramp-restricted-shell-hosts-alist will be out-of-date and cause >> ;; tramp not to function properly. >> (defadvice server-start (after update-restricted-host-list last activate) >>   (setf tramp-restricted-shell-hosts-alist >>         (when (memq system-type '(windows-nt)) >>           (list (concat "\\`" (regexp-quote (system-name)) "\\'"))))) >> >> But the proper fix should be to make sure (system-name) always returns >> the same string consistently. I found it is this sexp in "server-start" >> function that changes the return value of (system-name): >> >>       (setq server-process >>         (apply #'make-network-process ....)) > Thanks. However, your proposed solution is very hard to implement > (for boring technical reasons), so my suggestion is for Trump to > compare system names case insensitively, at least on MS-Windows, with > a proper comment to explain why.