diff --git a/Changelog b/Changelog index f63bd26ac..1515cf16e 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ * Unreleased - Christophe Dumez - v2.0.6 - BUGFIX: Fix detection of invalid torrent files + - BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop * Web Dec 31 2009 - Christophe Dumez - v2.0.5 - BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces diff --git a/src/main.cpp b/src/main.cpp index 248cd1bfc..2952834e2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,10 +62,13 @@ QApplication *app; #ifndef Q_WS_WIN void sigtermHandler(int) { + signal(SIGTERM, 0); qDebug("Catching SIGTERM, exiting cleanly"); app->exit(); } void sigsegvHandler(int) { + signal(SIGABRT, 0); + signal(SIGSEGV, 0); std::cerr << "\n\n*************************************************************\n"; std::cerr << "Catching SIGSEGV, please report a bug at http://bug.qbittorrent.org\nand provide the following backtrace:\n"; print_stacktrace(); @@ -73,6 +76,8 @@ void sigsegvHandler(int) { std::abort(); } void sigabrtHandler(int) { + signal(SIGABRT, 0); + signal(SIGSEGV, 0); std::cerr << "\n\n*************************************************************\n"; std::cerr << "Catching SIGABRT, please report a bug at http://bug.qbittorrent.org\nand provide the following backtrace:\n"; print_stacktrace(); @@ -210,6 +215,7 @@ int main(int argc, char *argv[]){ delete splash; } int ret = app->exec(); + signal(SIGTERM, 0); delete window; qDebug("GUI was deleted!"); qDebug("Deleting app...");