help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to communicate with a running external process with given PID?


From: Rustom Mody
Subject: Re: How to communicate with a running external process with given PID?
Date: Mon, 22 Jul 2013 21:44:09 -0700 (PDT)
User-agent: G2/1.0

On Monday, July 22, 2013 11:48:20 PM UTC+5:30, Pascal J. Bourguignon wrote:
> Rustom Mody writes:
> > I believe a more modern approach may be to look at dbus
> What for?  Try to talk to processes created from this program with dbus:
> 
> ------------------------------------------------------------------------
> 
> int main(){
>     close(0);close(1);close(2);
>     while(1)sleep(1);
>     return 0;}

If you dont want to talk to me I can hardly succeed in talking to you!!

If we do want to talk to each other, there may still be issues of rendezvous, 
finding a language we both understand etc. 
OPs question is not clear how much control he has on the internals of the other 
process -- the fact that it is in lisp suggests that it is not completely a 
black box to him.

And Dbus is a not too high or low level of IPC; ie it would work out more 
convenient than home-brewed IPC over sockets:
http://dbus.freedesktop.org/doc/dbus-specification.html#introduction

At the least it would save serialization headaches.

[If you are saying it will add its own share of headaches... maybe dunno... 
In particular I would not bet on the windows implementation.
But then unix domain sockets may not be so portable either]

> 
> ------------------------------------------------------------------------
> Duh!

Agreed!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]