进程间通信 Posix
我正在 debian 系统上工作,必须传达一些进程,所以我正在寻找一些建议或文档...
作为强加的规则,我不能使用任何库,例如 boost,所以我尝试在 systemV IPC 和 POSIX 之间进行选择ipc设施,但我还没有找到任何关于后者的好文档。请你帮助我好吗?
另外我一直在寻找 ipc 最佳实践手册或类似的东西......你认识吗?
预先感谢(请原谅我的英语)
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 )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
以下是描述您所询问的所有问题的好书:
Unix 系统编程,罗宾斯和罗宾斯。
UNIX 环境中的高级编程,Stevens。
他们都很好地讨论了 SYSV 和 POSIX IPC 方法,并且是大学 CS 课程的主要内容。
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.
这是一个很好的教程/指南
http://beej.us/guide/bgipc/
Here's a nice tutorial/guide
http://beej.us/guide/bgipc/
第 5 章 (PDF) of 高级 Linux 编程 是对 Linux 中 IPC 方法的精彩描述。它涵盖套接字、管道和 System V IPC,但不包括 POSIX IPC。
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.
IPC 的最佳实践之一是管道。
是IPC的一种形式。一个进程是缓冲区的写入者,另一个进程是缓冲区的读取者。
这是快速的,实现起来很简单,不需要专门的知识或库,直接由 shell 和操作系统支持。
很少有事情像管道一样简单。
One best practice for IPC is the pipeline.
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.