title: How to use select() for waiting ethernet interface state changes?
body: <p>My program must detect when an ethernet interface turn to <code>RUNNING</code> state.</p>
  
  <p>I can poll the running flag by using <code>ioctl()</code>:</p>
  
  <pre><code>if( ioctl( dummy_fd, SIOCGIFFLAGS, &amp;ifr ) != -1 )
      return ifr.ifr_flags &amp; IFF_RUNNING;
  </code></pre>
  
  <p>But want the information immediately without polling. Currently the program uses <code>select()</code> for waiting other events. So it would be nice to use <code>select()</code> for detecting state changes of interfaces.</p>
  
  <p>There is a way to do it with <code>select</code>, I did read about that from net. But I don't find that page anymore.</p>