poll

I am using unix socket poll()

If poll returns 0, it means timeout. But does this guarantee that socket connection is STILL Alive?

learningunixAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Infinity08Connect With a Mentor Commented:
If the connection was closed, poll will actually return a value > 0.

It might also have set POLLHUP in fds->revents to indicate that the remote side hung up the connection. Check the man page for poll on your system :

        man poll
0
 
learningunixAuthor Commented:
thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.