首页 > UNIX网络编程第六章的疑惑

UNIX网络编程第六章的疑惑

《UNIX网络编程》volume1 3th edition

第六章 6.1的概述部分

这里我就开始有点疑惑了

书上说道:“我们遇到的问题是就在客户阻塞于(标准输入上的)fgets调用期间,服务器进程会被杀死。

搞不懂的就是:客户阻塞于fgets期间服务器进程会被杀死有关系吗?

按照书上的说法那就是由于客户阻塞于fgets导致了服务器进程被杀死了,可以这样理解吗?

这两个东西存在因果关系或者逻辑关系吗?


怀疑是翻译的问题,最好找英文版看一下。


英文原文是:

We encountered a problem when the client was blocked in a call
to fgets (on standard input) and the server process was killed

and这个词表示:the client was blocked和the server process was killed。
也就是当the client was blocked和the server process was killed都发生的时候,会出问题。

我劝你还是看英文原文吧。
中文翻译错了。


说明的是以一种偶然情况,在客户端阻塞的时候,服务端挂掉了,这个时候客户端显然没有办法得知这个情况,然后就会一直阻塞下去。

【热门文章】
【热门文章】