Reghunath P D wrote:
> 
> Dear Sir,
> 
> Here is my problem,
> 
> Sub:InterProcess Communication in Linux
> 
> There are two neverending, independent, concurrent process..P1 and P2
> P1 is capable of generating some data..
> and p2 is capable of consuming some data.
> P1 is a C Process
> P2 is a Java Process
> 
> Q::No 1
> *******
> Is there exists any way to redirect the output of p1 , to p2 without
> disturbing p1 or p2..?
> (With the use of pipes p2 has to wait for the completion of p1. Any other way
> ?)

Use a thread to read from the pipes.  The thread can block without 
disturbing the flow of the rest of the java program.

Unix pipes run sequentially as they do on windows.  Unix pipes send
data as soon as the IO buffers are flushed if buffers are used, otherwise
it is delivered right away, more or less.  

Without knowing more about P1 it's hard to say what exactly is possible.

> 
> Q::No 2
> *******
> if I have the rights to modify p2 (Java),
> How can I consume or use the o/p of p1.
> 
> Q::No 3
> *******
> if i have the rights to modify p1 & p2 ,i think  Sockets are usefull.
> is there exist any way other than sockets ?
> 
> I'll be very helpful if these things are cleared..
> 

Network sockets, unix sockets, pipes, IPC, and shared memory. (Dunno about
that on a linux box though. It may be a kernel compile option.)

--
Joi Ellis                    Software Engineer
Aravox Technologies          [EMAIL PROTECTED], [EMAIL PROTECTED]

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
           - Chris Johnson


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to