tags:

views:

436

answers:

4

Hi all,

I am working on a debian system and have to communicate some processes so i am looking for some advise or documentation ...

As an imposed rule, i cannot use any library such as boost, so i am trying to choose between systemV IPC and POSIX ipc facilities , but i have not found any good document about the later. ¿Could you please help me?

Also i have been looking for a ipc best practices manual or something like that... Do you know anyone?

Thanks in advance (and forgive me for my English )

A: 

Here's a nice tutorial/guide

http://beej.us/guide/bgipc/

Tom
Thanks for your answer,I already knew Beej´s guide, it is a very interesting document, but it only talks about SystemV ipc functions, and i am looking for a document for the Posix one.
thamurath
+1  A: 

One best practice for IPC is the pipeline.

process | anotherProcess

Is a form of IPC. One process is a writer to a buffer, the other process is a reader from a buffer.

This is fast, trivial to implement, requires no specialized knowledge or libraries, is supported directly by the shell and the OS.

Few things are as simple as the pipeline.

S.Lott
S.Lott: I am sorry but i have not explain it well. When i said "best practices manual" i was talking about some document where i could find hints, common errors and patterns about ipc programming.Thanks again.
thamurath
@thamurath: I'm giving you a best practice. This is the number one, most important, best practice for IPC. It's simple, effective, and works universally. There are other methods which you can read about by Googling IPC (Semaphore, Mutex, Locking, Threading, etc.)
S.Lott
+1  A: 

The following are great books describing all you are asking about:

Unix Systems Programming, Robbins and Robbins.

Advanced Programming in the UNIX Environment, Stevens.

They both do a great job talking about SYSV and POSIX IPC approaches and are the staple in college curriculum for CS.

Los
A: 

Chapter 5 (PDF) of Advanced Linux Programming is an excellent description of IPC methods in Linux. It covers sockets, pipes, and System V IPC, but not POSIX IPC.

Josh Kelley