summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libc/stdlib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libc/stdlib.c b/src/libc/stdlib.c
index b4c2d84..07eabd4 100644
--- a/src/libc/stdlib.c
+++ b/src/libc/stdlib.c
@@ -67,7 +67,14 @@ void __attribute__( ( noreturn ) ) abort( void )
{
// TODO: this should be done on process level, terminating
// the process (by signalling SIGABRT for instance)
+#ifdef OS_ABAOS
kernel_panic( "aborted" );
+#endif
+#ifdef OS_LINUX
+ // TODO: this clearly wrong, but for now we exit with a 255 exit code
+ // on abort..
+ syscall1( __NR_exit, 255 );
+#endif
// make gcc happy ("error: ‘noreturn’ function does return")
for( ;; );