|
数据字节数(此时,管道中数据量小于请求的数据量);或者返回请求的字节数(此时,管道中数据量不小于请求的数据量)。注:(PIPE_BUF在include/linux/limits.h中定义,不同的内核版本可能会有所不同。Posix.1要求PIPE_BUF至少为512字节,red hat 7.2中为4096)。
关于管道的读规则验证:
* readtest.c *
#include
#include
#include
main()
{
int pipe_fd.;
pid_t pid;
char r_buf[100];
char w_buf.;
char* p页码:[1] [2] [3] [4] [5] 第2页、共5页 |