> Set the FDs[0].events to some value other than zero, you are
> telling the kernel you are interested in "no events". Read the
> poll() man page for details.
The man pages state : The field events is an input parameter, a bitmask
specifying the events the application is interested in. The field
revents
is an output parameter, filled by the kernel with the events that
actually
occurred, either of the type requested, or of one of the types POLLERR
or POLLHUP or POLLNVAL. (These three bits are meaningless in the
events field, and will be set in the revents field whenever the
corresponding condition is true.)
So putting 0 in the events fields is a normal value when the application is
only
insterested in the error cases.
Anyway, I tried to put POLLPRI in the events field to avoid potential trouble
(if
any) with the 0 value. The behavior is the same: poll does not indicate the
hangup of the other end.
Best regards.
Bernard.
+--------------------------------------+
| Bernard MAUDRY |
| Top Graph'X Customer Support |
| 10, allee de la mare Jacob |
| 91290 La Norville |
| FRANCE |
| Tel: (33) 1 69 26 97 88 |
| Fax: (33) 1 69 26 97 89 |
| email: support@xxxxxxxxxxxxx |
+--------------------------------------+
|