From 1c9b6e2790fd8a1a1291b41a28a1b8cb9f6f7a32 Mon Sep 17 00:00:00 2001 From: Guy McSwain Date: Sat, 2 May 2020 11:17:25 -0500 Subject: [PATCH] Issue #220 Calling exit from a signal handler is not safe. --- pigpio.c | 6 +++--- pigpio.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pigpio.c b/pigpio.c index 5b11476..5e04e0a 100644 --- a/pigpio.c +++ b/pigpio.c @@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ -/* pigpio version 76 */ +/* pigpio version 7602 */ /* include ------------------------------------------------------- */ @@ -5621,7 +5621,7 @@ static void sigHandler(int signum) default: DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); gpioTerminate(); - exit(-1); + _exit(); } } } @@ -5631,7 +5631,7 @@ static void sigHandler(int signum) DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); gpioTerminate(); - exit(-1); + _exit(); } } diff --git a/pigpio.h b/pigpio.h index 7aa6f78..56a5f11 100644 --- a/pigpio.h +++ b/pigpio.h @@ -30,7 +30,7 @@ For more information, please refer to #include #include -#define PIGPIO_VERSION 7601 +#define PIGPIO_VERSION 7602 /*TEXT