opipe.c
来自「基于网络编程的例子」· C语言 代码 · 共 22 行
C
22 行
/* * opipe.c - Open and close a pipe */#include <unistd.h>#include <stdio.h>#include <stdlib.h>int main(void){ int fd[2]; /* Array for file descriptors */ if((pipe(fd)) < 0) { perror("pipe"); exit(EXIT_FAILURE); } printf("descriptors are %d, %d\n", fd[0], fd[1]); close(fd[0]); close(fd[1]); exit(EXIT_SUCCESS);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?