vendredi 27 février 2015

What, as examples, can produce a POLLNVAL?


The reference about poll() just says “The specified fd value is invalid. This flag is only valid in the revents member; it shall ignored in the events member.”.


That's not clear (at least to me): if the file descriptor is invalid, shouldn't poll return an error instead (negative return value)?


I had the same question about POLLERR and learned somewhere it may refers to, as an example, error in a device or network. This one, POLLNVAL, remains mysterious.


Do someone know example cases?



Aucun commentaire:

Enregistrer un commentaire