MNRS-BM-BSP/raven/bsp/libwrap/sys/_exit.c

18 lines
361 B
C
Raw Normal View History

2020-09-03 11:13:37 +02:00
/* See LICENSE of license details. */
#include <unistd.h>
#include "platform.h"
#include "weak_under_alias.h"
2020-09-03 11:13:37 +02:00
void __wrap_exit(int code)
2020-09-03 11:13:37 +02:00
{
const char message[] = "\nProgam has exited with code:";
write(STDERR_FILENO, message, sizeof(message) - 1);
write_hex(STDERR_FILENO, code);
2020-09-03 11:13:37 +02:00
write(STDERR_FILENO, "\n", 1);
for (;;);
}
weak_under_alias(exit);