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
It will continue to set POLLHUP in revents. Also, see http://linux.die.net/man/3/poll for reference.