title: How to use the poll C function to watch named pipes in Linux?
body: <p>I am trying to write a program where i am supposed to watch the ends of some named pipes
  using poll function.
  I have a for loop to check every pipe whenever poll returns >0 and i know that when a pipe gets closed from the procedure at the other end, i will get POLLHUP or POLLIN | POLLHUP in the revents field of the pollfd struct.</p>
  
  <p>My question is: when one pipe does indeed get closed and returns POLLHUP to me, what will happen on the next loop? Is it going to return POLLHUP again and again in the next and any subsequent loop or is poll function going to ignore it after the first POLLHUP?</p>