ref: bbaf9f73ee505dceb7fddd16cad55ab7b1506b4c
parent: 9f3ba220106cc1bd41abd6bbcf1a62c603f44bdc
author: Noam Preil <noam@pixelhero.dev>
date: Fri Dec 12 04:52:39 EST 2025
implement _exit
--- a/include/npe/npe.h
+++ b/include/npe/npe.h
@@ -59,5 +59,7 @@
int kill(int pid, int sig);
extern void (*exit)(int);
int system(const char *);
+#define _Exit _exit
+_Noreturn void _exit(int);
#endif
--- a/libnpe/_npe.c
+++ b/libnpe/_npe.c
@@ -9,6 +9,12 @@
exits(x == 0 ? nil : "error");
}
+_Noreturn void
+_exit(int x)
+{+ _exits(x == 0 ? nil : "error");
+}
+
int errno = 0;
void (*exit)(int) = npe_exit;
--
⑨