summaryrefslogtreecommitdiff
path: root/userland/libc/unistd/_exit.c
blob: a6cc64518ab8b78791218680a9e10141012dbf98 (plain)
1
2
3
4
5
6
7
8
9
10
#include <syscall.h>
#include <unistd.h>

// FIXME: Technically exit and _exit are different but this
// stackoverflow answer says that it does not usually matter. So lets
// hope that is the case.
// https://stackoverflow.com/a/5423108
void _exit(int status) {
  syscall(SYS_EXIT, (void *)status, 0, 0, 0, 0);
}