diff -Naur p0f.c.orig p0f.c
--- p0f.c.orig	2006-08-22 00:16:00.000000000 +1000
+++ p0f.c	2006-11-05 21:36:45.000000000 +1100
@@ -1813,12 +1813,19 @@
 
   if (use_cache) {
 
+    char errbuf[PCAP_ERRBUF_SIZE];
+    if(pcap_setnonblock(pt, 1, errbuf) == -1) {
+      debug("[!] Failed to set non blocking mode on device: %s", errbuf);
+    }
+
     _s32 mfd,max;
 
     mfd = pcap_fileno(pt);
 
     max = 1 + (mfd > lsock ? mfd : lsock);
 
+    struct timeval timeout;
+
     while (1) {
       fd_set f,e;
 
@@ -1835,9 +1842,11 @@
 	 raw socket, even with no SA_RESTART, it's a mess... select()
 	 is rather neutral. */
 
-      select(max,&f,0,&e,0);
+      timeout.tv_sec = 1;
+      timeout.tv_usec = 0;
+      select(max,&f,0,&e,&timeout);
 
-      if (FD_ISSET(mfd, &f) || FD_ISSET(mfd,&e))
+      //      if (FD_ISSET(mfd, &f) || FD_ISSET(mfd,&e))
         if (pcap_dispatch(pt,-1,(pcap_handler)&parse,0) < 0) break;
 
       if (FD_ISSET(lsock,&f)) {
