摘录


Don't depend on it. That's pretty much implementation-defined: use the
FIONREAD ioctl to fetch available info from pipes, sockets, ttys etc.

Some versions of Linux will not give the size of the pipe from stat(), if I remember correctly. And as far as I know, no version of Linux will have st_size mean anything at all for sockets (pipes, yes. Both named and unnamed - at least with the current implementation. But not sockets. How could, it, anyway, as a socket name is nothing but a bind entry, and can have many sockets associated with it?).

点评

NULL

原文

点击这里查看原文

其它

本帖内容由21QA云收藏工具自动生成,欢迎使用。

系统消息 若觉得内容不错,请点击左上角的"赞"图标,以优化网站的内容呈现。 另外,请及时验证注册邮箱,否则收不到21QA发出的红包。 官方Q群:250203055

asked 02 Jul '15, 13:55

%E8%B7%AF%E4%BA%BA%E7%94%B2's gravatar image

路人甲
131726860896

Be the first one to answer this question!
toggle preview

powered by O*S*Q*A

粤ICP备14040061号-1