0

Possible Duplicate:
Which Linux IPC technique to use?

I am working on a project relates to IPC programming in Linux, using C language. I am going to "send" data between processes but must not use socket.

I am going to use pipe, but when I search internet for pipe's document, all the tutorial is relate to Linux's system calls.

May anyone please recommend me any library support IPC programming, the system calls are seem to be a liitle bit difficult to use.

And another question is: is pipe the most suitable way?

Thank you so much for reading!

Community
  • 1
  • 1
leokaka
  • 151
  • 1
  • 1
  • 6
  • What about using queues and/or shared memory? Yout might like to read `man svipc` and/or `man mq_overview`. – alk Dec 10 '12 at 15:11
  • Pipe is a socket. What are trying to say about sockets? – Nicholas Wilson Dec 10 '12 at 15:11
  • 1
    Why cannot you use sockets? Is it some homework? – Basile Starynkevitch Dec 10 '12 at 15:16
  • Yes, it is one of my homework. I am reading information about IPC methods. I dont see anything that pipe is socket! – leokaka Dec 10 '12 at 15:26
  • BasileStarynkevitch:Yes, it is one of my homework. NicholasWilson :Sorry but I dont see anything that pipe is socket. alk: shared memory have the problem about synchronous, isn't is? VaughnCato: Yes, I have just searched one document about it, i'm reading it now. Thanks – leokaka Dec 10 '12 at 15:32
  • Well what do you think a 'pipe' is then if you're not talking about the thing you get with `pipe()` or `socketpair()`? I mean, on some unixes, they're almost synonyms. There are a few differences between fifos and unix-domain sockets, but it's just a few flags in the kernel, and they clearly do basically identical things. I doubt any specific code is touched by read/write calls. – Nicholas Wilson Dec 10 '12 at 15:51
  • Thanks @NicholasWilson, I think I had a big misunderstand. The "sockets" I mean is the sockets using for network programming (Sockets work by using IP and Port information). I must not use anything work on OSI models. So when i am see the name "Unix domain sockets", I misunderstanded. However, Unix domain socket is not the type of socket using OSI models, is it right? Thank you (for reading my stupid question!) – leokaka Dec 11 '12 at 08:58

1 Answers1

1

You can use a named pipe. Do man mkfifo for more information.

Arun Taylor
  • 1,574
  • 8
  • 5