?? sizepipe.c
字號:
#include "apue.h"#include <fcntl.h>intmain(void){ int i, n; int fd[2]; if (pipe(fd) < 0) err_sys("pipe error"); set_fl(fd[1], O_NONBLOCK); /* * Write 1 byte at a time until pipe is full. */ for (n = 0; ; n++) { if ((i = write(fd[1], "a", 1)) != 1) { printf("write ret %d, ", i); break; } } printf("pipe capacity = %d\n", n); exit(0);}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -