From 96f18dcfd62a2bf95685cf261806165ad25c9fa8 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Wed, 8 Dec 2021 14:30:02 -0500 Subject: [PATCH] PCAP: Don't use pthread_cancel on Linux It is not necessary and can cause a crash in libunwind --- platform/posix/pcap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/posix/pcap.cpp b/platform/posix/pcap.cpp index 468dce1..48925c9 100644 --- a/platform/posix/pcap.cpp +++ b/platform/posix/pcap.cpp @@ -259,7 +259,9 @@ bool PCAP::close() { closing = true; // Signal the threads that we are closing pcap_breakloop(iface.fp); +#ifndef __linux__ pthread_cancel(readThread.native_handle()); +#endif readThread.join(); writeThread.join(); closing = false;