The Samba-Bugzilla – Bug 7955
tevent_add_fd() should fail when passed a negative fd
Last modified: 2011-02-14 09:57:26 UTC
Currently, tevent_add_fd() will accept a negative fd (e.g. -1). It will then fail later when select() is called on that file descriptor. (Making it difficult to track down where the faulty tevent_add_fd() was called.
tevent_add_fd() should fail and return NULL if the file descriptor is negative
Bug was noted on libtevent 0.9.8 and 0.9.10.
Created attachment 6246 [details]
Patch to return NULL on negative file descriptor