⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 call.c

📁 UNIX环境高级编程第二版(英文版)配书的源代码
💻 C
字号:
#include	"call.h"#include	<sys/uio.h>		/* struct iovec *//* * Place the call by sending the "args" to the calling server, * and reading a file descriptor back. */intcall(const char *args){	int				csfd, len;	struct iovec	iov[2];	/*	 * Create connection to connection server.	 */	if ((csfd = cli_conn(CS_CALL)) < 0)		err_sys("cli_conn error");	iov[0].iov_base = CL_CALL " ";	iov[0].iov_len  = strlen(CL_CALL) + 1;	iov[1].iov_base = (char *) args;	/* null at end of args always sent */	iov[1].iov_len  = strlen(args) + 1;	len = iov[0].iov_len + iov[1].iov_len;	if (writev(csfd, &iov[0], 2) != len)		err_sys("writev error");	/*	 * Read back the descriptor.  Returned errors are handled	 * by write().	 */	return(recv_fd(csfd, write));}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -