我有一个运行在RHEL 6上的python 2.7应用程序偶尔会挂起。 如果我把应用程序拉直,我会重复这样的:
[pid 180442] select(0, NULL, NULL, NULL, {10, 0}) = 0 (Timeout) [pid 180442] select(0, NULL, NULL, NULL, {10, 0}) = 0 (Timeout)
这个select在等什么? 有没有在那里隐藏的文件句柄?
没有文件句柄。 男人select :
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); nfds is the highest-numbered file descriptor in any of the three sets, plus 1
readfds,writefds和exceptfds都是空的(NULL)
超时时间是10秒。
所以它只是在等什么。