Issue #220 Calling exit from a signal handler is not safe.
authorGuy McSwain <guy.mcswain@gmail.com>
Sat, 2 May 2020 16:17:25 +0000 (11:17 -0500)
committerGuy McSwain <guy.mcswain@gmail.com>
Sat, 27 Jun 2020 12:22:57 +0000 (07:22 -0500)
pigpio.c
pigpio.h

index 5b1147641c4184efac21cb464fd5e57cca9ae659..5e04e0a899f3bdb9a70a1e8c88944a3c871efda3 100644 (file)
--- a/pigpio.c
+++ b/pigpio.c
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 For more information, please refer to <http://unlicense.org/>
 */
 
-/* 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();
    }
 }
 
index 059d75156d372b2c0e99f925eb1ff8f4adb5f16c..56a5f1151ea972f1fdfed960665aac086b8d033f 100644 (file)
--- a/pigpio.h
+++ b/pigpio.h
@@ -30,7 +30,7 @@ For more information, please refer to <http://unlicense.org/>
 #include <stdint.h>
 #include <pthread.h>
 
-#define PIGPIO_VERSION 76
+#define PIGPIO_VERSION 7602
 
 /*TEXT