zmap/zmap — pull request #156 by ronnychevalier (2014-05-07 12:39:43+00:00)
Title: avoid using 100% resources on a CPU for recv thread

The previous fix for avoiding endless loop when we never receive a packet
use non blocking mode, so the current loop will consume every resources available
on the current CPU.

By using pcap_loop and pcap_breakloop and a waiting thread, it will not hang when
we never receive a packet and will not consume the CPU resources.