[libc-commits] [libc] [libc] Implement execlp in unistd (PR #232901)
Aman Maurya via libc-commits
libc-commits at lists.llvm.org
Thu Oct 22 03:22:32 PDT 2026
================
@@ -0,0 +1,67 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Linux implementation of execlp.
+///
+//===----------------------------------------------------------------------===//
+
+#include "src/unistd/execlp.h"
+
+#include "hdr/types/size_t.h"
+#include "src/__support/common.h"
+#include "src/__support/libc_errno.h"
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/null_check.h"
+#include "src/unistd/environ.h"
+#include "src/unistd/linux/exec_utils.h"
+
+#include <stdarg.h>
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, execlp, (const char *file, const char *arg0, ...)) {
+ LIBC_CRASH_ON_NULLPTR(file);
+ LIBC_CRASH_ON_NULLPTR(arg0);
+
+ va_list varargs, varargs_copy;
----------------
amanmaurya92 wrote:
I'd be very happy to take that on as a follow-up patch.
https://github.com/llvm/llvm-project/pull/232901
More information about the libc-commits
mailing list