From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Buchs, Kevin J." Newsgroups: gmane.emacs.help Subject: Re: How to communicate with a running external process with Date: Mon, 22 Jul 2013 15:27:06 +0000 Message-ID: <7DEC2F40B9E0874681480168A47FD3C11AF1E5E6@MSGPEXCEI32B.mfad.mfroot.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1374506851 4405 80.91.229.3 (22 Jul 2013 15:27:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 15:27:31 +0000 (UTC) To: "'help-gnu-emacs@gnu.org'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 22 17:27:32 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 1V1I1M-000520-KM for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 17:27:32 +0200 Original-Received: from localhost ([::1]:49295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1I1M-0003Gd-7e for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 11:27:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1I14-0002z0-M2 for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 11:27:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1I10-00076e-F2 for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 11:27:14 -0400 Original-Received: from mail10.mayo.edu ([129.176.212.47]:29121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1I10-00075G-BB for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 11:27:10 -0400 Original-Received: from roedlp003a.mayo.edu (HELO mail10.mayo.edu) ([129.176.158.13]) by ironport10-dlp.mayo.edu with ESMTP; 22 Jul 2013 10:27:07 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai8FADFO7VGBsNQ1/2dsb2JhbABXA4MGNVDAMYEWFnSCJAEBAQQ6SwYBCCIUQiYBBBMIiAiXTJgjiAePYwIhKIJ/bgOpKoMSgio Original-Received: from mhro1a.mayo.edu ([129.176.212.53]) by ironport10.mayo.edu with ESMTP; 22 Jul 2013 10:27:07 -0500 Original-Received: from MSGPEXCHA28B.mfad.mfroot.org (msgpexcha28b.mayo.edu [129.176.249.247]) by mhro1a.mayo.edu with ESMTP id BT-MMP-18608196 for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:27:07 -0500 Original-Received: from MSGPEXCHA29B.mfad.mfroot.org (129.176.250.23) by MSGPEXCHA28B.mfad.mfroot.org (129.176.249.247) with Microsoft SMTP Server (TLS) id 14.2.342.4; Mon, 22 Jul 2013 10:27:06 -0500 Original-Received: from MSGPEXCEI32B.mfad.mfroot.org ([169.254.7.72]) by MSGPEXCHA29B.mfad.mfroot.org ([169.254.12.86]) with mapi id 14.02.0342.004; Mon, 22 Jul 2013 10:27:06 -0500 Thread-Topic: How to communicate with a running external process with Thread-Index: Ac6G7oht9XV1MNdDSwKud7+VPEC0WA== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.209.15] Old-x-esetresult: clean, is OK Old-x-esetid: 78EBA53D940134342EA6F5 X-ESET-AS: SCORE=1 X-EsetResult: clean, is OK X-EsetId: B596A53DF2A53234E3DBF5 X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 129.176.212.47 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:92323 Archived-At: Thorsten, Your questions and responses suggest that maybe you are not grasping some b= asics of interprocess communication. You have some other program running in= another process, not started by emacs and you want to communicate with it.= A critical factor in such communication will be knowing how that other pro= gram is set up to communicate. Some programs are developed to have standard= communication ports and protocols, like HTTP. Unix/Linux supports signals = (kill) which a program may be set up accept and respond appropriately towar= d. A program may support TCP/IP or Unix sockets. A program may read and wri= te files. You might have shared memory space or semaphores. There are dozen= s of different mechanisms. Emacs supports some of them out of the box. It m= ight be that you can extend emacs by writing code to support other mechanis= ms. Another alternative is for emacs to communicate with a subprocess it cr= eates running a program designed to communicate with the other process. How= ever, what does the other program support? This is the question you need to= answer. We can't make up an answer for you. As an analogy, if you and I wish to speak, we may need to speak face to fac= e. If we don't speak the same language we have trouble. Maybe we can talk o= n the telephone, but if you don't have a telephone, we are not going to spe= ak that way. Communication takes appropriate coordination for the sender an= d receiver.=20 Kevin Buchs | Senior Engineer | SPPDG | 507-538-5459 | buchs.kevin@mayo.edu Mayo Clinic | 200 First Street SW | Rochester, MN 55905 | http://www.mayo.e= du -----Original Message----- > How would you communicate with the external process, from any other > program? I don't know, and I interpreted the responses so far to my post as "it is impossible, only 'kill' can access the running external process with given PID" - but kill sends signals, no command-strings or so.=20 So when suggestions arrive like 'use plain socket communication' I'm still curious if there is a 'magic hack' to achieve that, given that the external process is NO Emacs subprocess and already running.