From 8261f21ea9676bccccf9d03dd0ad72d841bd1ec3 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 27 Feb 2019 19:52:24 -0500 Subject: make final call in infinite loop so _Noreturn holds true --- src/unistd/_exit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/unistd') 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) -- cgit v1.2.1