From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: How to communicate with a running external process with Date: Wed, 24 Jul 2013 08:34:44 +0200 Message-ID: <87zjtcihyz.fsf@gmail.com> References: <7DEC2F40B9E0874681480168A47FD3C11AF1E5E6@MSGPEXCEI32B.mfad.mfroot.org> <87txjlr9js.fsf@gmail.com> <87mwpd3xgy.fsf@informatimago.com> <87ppu99gqy.fsf@gmail.com> <87ehao512c.fsf@informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1374647711 27305 80.91.229.3 (24 Jul 2013 06:35:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 06:35:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 24 08:35:13 2013 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 1V1sfI-0006xx-PD for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jul 2013 08:35:12 +0200 Original-Received: from localhost ([::1]:37036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1sfI-0007Vr-BV for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jul 2013 02:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1sf8-0007SU-8S for help-gnu-emacs@gnu.org; Wed, 24 Jul 2013 02:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1sf7-0001vz-1l for help-gnu-emacs@gnu.org; Wed, 24 Jul 2013 02:35:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:33260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1sf6-0001vb-Rp for help-gnu-emacs@gnu.org; Wed, 24 Jul 2013 02:35:00 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V1sf3-0006du-18 for help-gnu-emacs@gnu.org; Wed, 24 Jul 2013 08:34:57 +0200 Original-Received: from e178188051.adsl.alicedsl.de ([85.178.188.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jul 2013 08:34:57 +0200 Original-Received: from tjolitz by e178188051.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jul 2013 08:34:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178188051.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:npdHs0zhLtFzG+W5e0J4Fp57LIY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:92358 Archived-At: "Pascal J. Bourguignon" writes: > Thorsten Jolitz writes: >> I did not mean Common Lisp, but there is a Swank implementation for my >> Uncommon Lisp of interest, and it did not occur to me to consider it - >> so thanks for this marvelous tip! > > So just loading swank in that other lisp, and starting a swank sever: > > (swank:create-server :port 4005) ; in CL > > you can then connect to it from emacs with M-x slime-connect RET RET RET > > You can even do some kind of "RPC" (Remote Procedure Call) in both > directions (trivial from slime, have a look at [1] to evaluate emacs lisp > expressions from the other lisp). > > [1]: http://paste.lisp.org/display/22414 Thats nice. One headache is the security aspect, though. On [[http://stackoverflow.com/questions/309440/lisp-in-a-box-why-is-it-starting-a-server][stackoverflow]] someone asked the questions that came immediately to my mind too when thinking about starting a swank-server from a Lisp process that runs a long-running production webserver: ,------------------------------------------------------------------------- | Slime was meant to interface with a Swank server, which allows for | debugging and patching a live, long-running process on-the-fly, correct? | Isn't this dangerous? I certainly wouldn't want to just write and | execute code on-the-fly, on a production web server, potentially causing | it all to crash. – Cybis Nov 21 '08 at 22:18 1 | | Furthermore, isn't this a security issue? Anyone could connect to the | process and execute arbitrary LISP code. Why wouldn't there by some sort | of authentication/authorization mechanism for this, if that's what swank | was meant for? – Cybis Nov 21 '08 at 22:20 `------------------------------------------------------------------------- There seems to be authentication via a slime-secret file, but otherwise a connected user could execute arbitrary LISP code on the swank-server, right? -- cheers, Thorsten