Revision ea0a8be2 sysdep/unix/io.c

View differences:

sysdep/unix/io.c
2045 2045
{
2046 2046
  int poll_tout;
2047 2047
  time_t tout;
2048
  int nfds, events;
2048
  int nfds, events, pout;
2049 2049
  sock *s;
2050 2050
  node *n;
2051 2051
  int fdmax = 256;
......
2125 2125

  
2126 2126
      /* And finally enter poll() to find active sockets */
2127 2127
      watchdog_stop();
2128
      events = poll(pfd, nfds, poll_tout);
2128
      pout = poll(pfd, nfds, poll_tout);
2129 2129
      watchdog_start();
2130 2130

  
2131
      if (events < 0)
2131
      if (pout < 0)
2132 2132
	{
2133 2133
	  if (errno == EINTR || errno == EAGAIN)
2134 2134
	    continue;
2135 2135
	  die("poll: %m");
2136 2136
	}
2137
      if (events)
2137
      if (pout)
2138 2138
	{
2139 2139
	  /* guaranteed to be non-empty */
2140 2140
	  current_sock = SKIP_BACK(sock, n, HEAD(sock_list));

Also available in: Unified diff