[libc-commits] [libc] [libc][posix] implement _exit (PR #87185)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Apr 1 09:26:05 PDT 2024


================
@@ -0,0 +1,19 @@
+//===------------------- Implementation of _exit --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/unistd/_exit.h"
+#include "src/__support/common.h"
+#include "src/stdlib/_Exit.h"
+
+namespace LIBC_NAMESPACE {
+
+[[noreturn]] LLVM_LIBC_FUNCTION(void, _exit, (int status)) {
+  LIBC_NAMESPACE::_Exit(status);
----------------
nickdesaulniers wrote:

https://github.com/llvm/llvm-project/issues/87126#issuecomment-2030093379

Should be implemented in terms of a call to `quick_exit`.

https://github.com/llvm/llvm-project/pull/87185


More information about the libc-commits mailing list