Skip to content

Commit

Permalink
Use _Exit since it is standard in c99
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin committed Oct 12, 2024
1 parent d10c1fe commit 3fc2be3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
#include "gc.h"
#endif

#include <stdlib.h>

#ifndef JANET_REDUCED_OS

#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
Expand Down Expand Up @@ -251,7 +252,7 @@ JANET_CORE_FN(os_exit,
}
janet_deinit();
if (argc >= 2 && janet_truthy(argv[1])) {
_exit(status);
_Exit(status);
} else {
exit(status);
}
Expand Down

1 comment on commit 3fc2be3

@sogaiu
Copy link
Contributor

@sogaiu sogaiu commented on 3fc2be3 Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this comment at SO.

The claim is that _exit and _Exit are not the same on some operating systems.

No clue if that's true or if it matters here, but FWIW.

Please sign in to comment.