Re: interconnection between two processes

From: Ulrich Hobelmann (u.hobelmann_at_web.de)
Date: 07/18/05


Date: Mon, 18 Jul 2005 15:30:49 +0200

Roman Mashak wrote:
> Hello, All!
>
> I'm considering now what mechanisms to use for interconnection between 2
> processes: one is daemon, the other one is CGI-scipt. Both are running on
> the same host.
>
> What would be more comfortable and efficient to use:
> 1) pipes/FIFO
> 2) UNIX sockets
> 3) something else..

Really depends how they're supposed to communicate. If one
process creates the other one, then pipes are probably the easiest
(create pipe, then fork and exec). If you need two-way
communication, you need two pipe()s.

Closing the pipe can be the signal for the other process to exit.

-- 
XML is a prime example of retarded innovation.
	-- Erik Meijer and Peter Drayton, Microsoft Corporation


Relevant Pages

  • Re: interconnection between two processes
    ... >> I'm considering now what mechanisms to use for interconnection between 2 ... >> the same host. ... > Really depends how they're supposed to communicate. ... > Closing the pipe can be the signal for the other process to exit. ...
    (comp.unix.programmer)
  • Re: Duplex communication with pipes - is possible ?
    ... I want to create a Process Pool Object. ... and can communicate with them. ... I think I will use pipe. ... Trying to read too much could lead to deadlocks as well. ...
    (comp.lang.python)
  • Re: Whats faster: Pipe IO or File IO?
    ... And i wonder what would be the best performance to communicate with ... If you wrote to a file, you can write virtually unlimited amounts of data and your writing process will not be stalled. ... That data will be written to the disk, most likely the data which will be read next, so you'll have disk accesses. ... The written data will stay in the file until the file is deleted, data read from a pipe is freed. ...
    (comp.os.linux.development.apps)
  • Re: Newbie question on pipe() system call
    ... but nowhere I am mentioning the pid of which child process I ... When you read from a pipe, you are reading just from that pipe. ... the portable way for two processes to communicate via pipes is ... parent is communicating with two children, ...
    (comp.unix.programmer)
  • Re: tkinter, threads and asyncore together
    ... > My question is how to communicate with asyncore (to send a message, ... > using unix domain socket, but is seems wrong, why use sockets within the ... I might try file_dispatcher around a pipe, ... You need something selectable to wake asyncore up from its call to ...
    (comp.lang.python)