首页 > 代码库 > APUE:高级进程间通信
APUE:高级进程间通信
这一章核心内容:使用 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:高级进程间通信
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。