libpcap
libpcap copied to clipboard
Close the eventfd if we are non-blocking
The eventfd is used to break out of a poll() before it times out, used by pcap_breakloop(). If we are non-blocking, then the eventfd is never needed, so we close it. (And open a new eventfd if we switch to blocking).