xv6-chinese
xv6-chinese copied to clipboard
第0章 管道
“读操作会一直阻塞直到不可能再有新数据到来了,这就是为什么我们在执行 wc
之前要关闭子进程的写端口"
按照原文的
"The fact that read blocks until it is impossible for new data to arrive is one reason that it’s important for the child to close the write end of the pipe before executing wc above: if one of wc’s file descriptors referred to the write end of the pipe, wc would never see end-of-file. "
应该改为"这就是为什么我们在执行"wc"之前要关闭管道的写端口。"这样不会出现理解错误。