diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:52:24 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:52:24 -0500 |
commit | 8261f21ea9676bccccf9d03dd0ad72d841bd1ec3 (patch) | |
tree | f5fc50a4947cc714dcdfdbe32a3074025f2f1db5 /src/unistd/_exit.c | |
parent | 98f4736e705952cffdc58736a0b3f0fa74bbdbb4 (diff) |
make final call in infinite loop so _Noreturn holds true
Diffstat (limited to 'src/unistd/_exit.c')
-rw-r--r-- | src/unistd/_exit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c index 4f1ef7e6..618b839c 100644 --- a/src/unistd/_exit.c +++ b/src/unistd/_exit.c @@ -5,8 +5,10 @@ void _exit(int status) { - __syscall(((syscall_lookup_t)__libc(SYSCALL_LOOKUP))("exit"), status); - for (;;); + long scno = ((syscall_lookup_t)__libc(SYSCALL_LOOKUP))("exit"); + for (;;) { + __syscall(scno, status); + } } /* POSIX(1) |