1*2b395c3cSAndy Fiddaman /*
2*2b395c3cSAndy Fiddaman * This file and its contents are supplied under the terms of the
3*2b395c3cSAndy Fiddaman * Common Development and Distribution License ("CDDL"), version 1.0.
4*2b395c3cSAndy Fiddaman * You may only use this file in accordance with the terms of version
5*2b395c3cSAndy Fiddaman * 1.0 of the CDDL.
6*2b395c3cSAndy Fiddaman *
7*2b395c3cSAndy Fiddaman * A full copy of the text of the CDDL should have accompanied this
8*2b395c3cSAndy Fiddaman * source. A copy of the CDDL is also available via the Internet at
9*2b395c3cSAndy Fiddaman * http://www.illumos.org/license/CDDL.
10*2b395c3cSAndy Fiddaman */
11*2b395c3cSAndy Fiddaman
12*2b395c3cSAndy Fiddaman /*
13*2b395c3cSAndy Fiddaman * Copyright 2024 Oxide Computer Company
14*2b395c3cSAndy Fiddaman */
15*2b395c3cSAndy Fiddaman
16*2b395c3cSAndy Fiddaman /*
17*2b395c3cSAndy Fiddaman * execve(file, argv, envp)
18*2b395c3cSAndy Fiddaman */
19*2b395c3cSAndy Fiddaman
20*2b395c3cSAndy Fiddaman #pragma weak _execve = execve
21*2b395c3cSAndy Fiddaman
22*2b395c3cSAndy Fiddaman #include "lint.h"
23*2b395c3cSAndy Fiddaman #include <sys/types.h>
24*2b395c3cSAndy Fiddaman #include <unistd.h>
25*2b395c3cSAndy Fiddaman #include <sys/execx.h>
26*2b395c3cSAndy Fiddaman
27*2b395c3cSAndy Fiddaman int
execve(const char * file,char * const argv[],char * const envp[])28*2b395c3cSAndy Fiddaman execve(const char *file, char *const argv[], char *const envp[])
29*2b395c3cSAndy Fiddaman {
30*2b395c3cSAndy Fiddaman return (execvex((uintptr_t)file, argv, envp, 0));
31*2b395c3cSAndy Fiddaman }
32