Revert "Issue #220 Calling exit from a signal handler is not safe."
authorGuy McSwain <guy.mcswain@gmail.com>
Sun, 31 May 2020 18:44:14 +0000 (13:44 -0500)
committerGuy McSwain <guy.mcswain@gmail.com>
Sat, 27 Jun 2020 12:25:45 +0000 (07:25 -0500)
pigpio.c
pigpio.h

index 5e04e0a899f3bdb9a70a1e8c88944a3c871efda3..5b1147641c4184efac21cb464fd5e57cca9ae659 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 7602 */
+/* pigpio version 76 */
 
 /* include ------------------------------------------------------- */
 
@@ -5621,7 +5621,7 @@ static void sigHandler(int signum)
             default:
                DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum);
                gpioTerminate();
-               _exit();
+               exit(-1);
          }
       }
    }
@@ -5631,7 +5631,7 @@ static void sigHandler(int signum)
 
       DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum);
       gpioTerminate();
-      _exit();
+      exit(-1);
    }
 }
 
index 56a5f1151ea972f1fdfed960665aac086b8d033f..7aa6f780b23b7f8156df5d67a18063ebaea9782e 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 7602
+#define PIGPIO_VERSION 7601
 
 /*TEXT