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 given PID? Date: Mon, 22 Jul 2013 16:12:46 +0200 Message-ID: <87txjmy97l.fsf@gmail.com> References: <87fvv9ha6o.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374502409 14641 80.91.229.3 (22 Jul 2013 14:13:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 14:13:29 +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 16:13:31 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 1V1Grg-0003tk-MO for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 16:13:28 +0200 Original-Received: from localhost ([::1]:33091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Grg-0000xB-7x for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 10:13:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1GrK-0000lw-CF for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1GrH-0004JX-Hr for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:13:06 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1GrH-0004JG-BV for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:13:03 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V1GrB-0003ND-Ox for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 16:12:57 +0200 Original-Received: from e178189097.adsl.alicedsl.de ([85.178.189.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Jul 2013 16:12:57 +0200 Original-Received: from tjolitz by e178189097.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Jul 2013 16:12:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178189097.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:T1nPhU07TFimt/fqalK2yf6l9s8= 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:92318 Archived-At: Kevin Rodgers writes: > On 7/20/13 3:06 AM, Thorsten Jolitz wrote: >> say I want to call another program (more exactly, another Lisp program >> that is not Emacs Lisp) from an Emacs Lisp program. [snip] >> I just want to use a running external process with a given PID in a >> similar way I would use (a)synchronous processes created from Emacs >> with `call-process' or `start-process'. How can I do that? > > Since Emacs did not start the external process, it does not have > access to its standard input stream -- unless your OS provides a way > to do that (e.g. via a special /dev file). > > 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. 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. -- cheers, Thorsten