Posix: add '#pragma GCC poison exit'

Generally exit() should not be used on Posix, because it exits the whole
program instead of only the task.
This commit is contained in:
Beat Küng
2018-08-31 13:28:28 +02:00
parent 9193312bd0
commit 4e6139d9fb
7 changed files with 20 additions and 7 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h> /* memset, etc */
#include <stdlib.h> /* exit */
#define oom() exit(-1)
// FIXME: this needs to be checked: we need to handle OOM properly instead of just exiting
#define oom() system_exit(-1)
typedef void (ctor_f)(void *dst, const void *src);
typedef void (dtor_f)(void *elt);