Issue #220 Calling exit from a signal handler is not safe.

This commit is contained in:
Guy McSwain 2020-05-02 11:17:25 -05:00
parent c05024e20a
commit 1c9b6e2790
2 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/> For more information, please refer to <http://unlicense.org/>
*/ */
/* pigpio version 76 */ /* pigpio version 7602 */
/* include ------------------------------------------------------- */ /* include ------------------------------------------------------- */
@ -5621,7 +5621,7 @@ static void sigHandler(int signum)
default: default:
DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum);
gpioTerminate(); gpioTerminate();
exit(-1); _exit();
} }
} }
} }
@ -5631,7 +5631,7 @@ static void sigHandler(int signum)
DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum);
gpioTerminate(); gpioTerminate();
exit(-1); _exit();
} }
} }

View File

@ -30,7 +30,7 @@ For more information, please refer to <http://unlicense.org/>
#include <stdint.h> #include <stdint.h>
#include <pthread.h> #include <pthread.h>
#define PIGPIO_VERSION 7601 #define PIGPIO_VERSION 7602
/*TEXT /*TEXT