0

I have a python 2.7 app running on RHEL 6 that occasionally hangs. If I strace the app, I get this repeatedly:

[pid 180442] select(0, NULL, NULL, NULL, {10, 0}) = 0 (Timeout)
[pid 180442] select(0, NULL, NULL, NULL, {10, 0}) = 0 (Timeout)

What is it that this select is waiting on? Is there a filehandle hidden in there someplace?

user171971
  • 23
  • 2

1 Answers1

0

No filehandles. man 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 and exceptfds are all empty (NULL)

timeout is 10 seconds.

So it is simply waiting on nothing.

ptman
  • 28,394
  • 2
  • 30
  • 45