From 971e5754ffff497391786e7e0d9bdfc42097bc9e Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sat, 17 Jan 2015 19:23:57 +0000 Subject: [PATCH] Try to work around a libusb crash on exit after SIGINT. --- debian/changelog | 1 + dump1090.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 4b09b91..6e9dd48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ dump1090-mutability (1.10.3010.14mu-12) UNRELEASED; urgency=medium * Fix sort-by-message-count in the webmap. * Always sort missing values at the end of the table, even in a descending sort. * Avoid a (rare) divide-by-zero crash in 2MHz --phase-enhance. + * Try to work around a libusb crash on exit after SIGINT. -- Oliver Jowett Fri, 16 Jan 2015 20:34:33 +0000 diff --git a/dump1090.c b/dump1090.c index 8c0ebc6..793beef 100644 --- a/dump1090.c +++ b/dump1090.c @@ -1085,7 +1085,8 @@ int main(int argc, char **argv) { // Nothing is touching the rtlsdr device now. if (Modes.filename == NULL) { - rtlsdr_close(Modes.dev); + // This currently causes crashes within libusb for unknown reasons: + //rtlsdr_close(Modes.dev); } pthread_cond_destroy(&Modes.data_cond); // Thread cleanup - only after the reader thread is dead!