Claudio Jeker <clau...@openbsd.org> writes: > On Fri, Nov 17, 2023 at 09:46:56AM +0100, Sebastien Marie wrote: > > How about this instead. pcap_dispatch() returns -1 on error and -2 (aka > PCAP_ERROR_BREAK) on interrupt. On interrupt there is no need to print > anything (no matter the signal). pcap_geterr() will only print something > when pcap_dispatch() returns with -1 (PCAP_ERROR). > > Not sure if we should use PCAP_ERROR or -1. The manpage only mentions -1 > but the header file has the defines.
It works too. And 'rcctl restart pflogd' doesn't generate empty syslog message too (but it a lot less annoying than alarm). I am fine with both approchs, but the claudio@ one is interesting. Thanks. -- Sebastien Marie