diff --git a/libs/libc/src/init.cpp b/libs/libc/src/init.cpp index 9b47e16a..279b8d1e 100644 --- a/libs/libc/src/init.cpp +++ b/libs/libc/src/init.cpp @@ -16,8 +16,8 @@ static void check_for_file(int fd, FILE** target_stream, const char* path, const { if (errno == EBADF) *target_stream = fopen(path, mode); else - exit(errno); - if (!*target_stream) exit(errno); + exit(-127); + if (!*target_stream) exit(-127); errno = 0; } else { *target_stream = fdopen(fd, mode); }