From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: tramp: how kill process Date: Sun, 22 Nov 2015 13:58:22 -0700 Message-ID: <20151122135536697066500@bob.proulx.com> References: <56520381.3090900@gmail.com> <87vb8tc1oq.fsf@gmx.de> <56521FE7.3040703@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448225925 18996 80.91.229.3 (22 Nov 2015 20:58:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2015 20:58:45 +0000 (UTC) To: Paul , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 22 21:58:40 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a0biY-00052x-Ib for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Nov 2015 21:58:38 +0100 Original-Received: from localhost ([::1]:57475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0biY-0004qD-Md for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Nov 2015 15:58:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0biN-0004q3-D0 for help-gnu-emacs@gnu.org; Sun, 22 Nov 2015 15:58:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0biK-0001ho-71 for help-gnu-emacs@gnu.org; Sun, 22 Nov 2015 15:58:27 -0500 Original-Received: from havoc.proulx.com ([96.88.95.61]:51981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0biK-0001hf-20 for help-gnu-emacs@gnu.org; Sun, 22 Nov 2015 15:58:24 -0500 Original-Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id 875B2CB1; Sun, 22 Nov 2015 13:58:23 -0700 (MST) Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 4058121232; Sun, 22 Nov 2015 13:58:23 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 1DF692DC53; Sun, 22 Nov 2015 13:58:22 -0700 (MST) Mail-Followup-To: Paul , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <56521FE7.3040703@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 96.88.95.61 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108187 Archived-At: Paul wrote: > >>Unfortunatelly the following does not kill it: > >> > >>C-x C-f "/sudo::/root" > >>M-x: (kill-process "my-process-name") > > > >`kill-process' needs a process as argument, not a process name. > > > >>How to do it in elegant way then? I don't know how elegant this is but if worst comes to worst you can get a ps listing and then kill the associated ssh process. $ ps -efH | less /emacs ...look for ssh process associated with that emacs... $ kill 123 For example: $ ps -efH | less rwp 24638 1 0 Oct23 ? 00:03:31 /usr/bin/emacs rwp 5215 24638 0 13:55 pts/62 00:00:00 ssh -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none despair $ kill 5215 Bob