首页 > 系统服务 > 详细

APUE:高级进程间通信

时间:2017-05-29 21:34:59      阅读:324      评论:0      收藏:0      [点我收藏+]

这一章核心内容:使用 UNIX 域套接字传送文件描述符。

 

/* Create two new sockets, of type TYPE in domain DOMAIN and using
   protocol PROTOCOL, which are connected to each other, and put file
   descriptors for them in FDS[0] and FDS[1].  If PROTOCOL is zero,
   one will be chosen automatically.  Returns 0 on success, -1 for errors.  */
extern int socketpair (int __domain, int __type, int __protocol,
		       int __fds[2]) __THROW;

 

文件描述符的传送以来 cmsghdr 结构体。具体直接看书上源码。

APUE:高级进程间通信

原文:http://www.cnblogs.com/mfmans/p/6918987.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!