mailing list of musl libc
 help / color / mirror / code / Atom feed
ab81b2d33d35144192a8c22097461061c9bebad6 blob 456 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
#define _GNU_SOURCE
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include "syscall.h"

int fexecve(int fd, char *const argv[], char *const envp[])
{
	int r = __syscall(SYS_execveat, fd, "", argv, envp, AT_EMPTY_PATH);
	if (r != -ENOSYS) return __syscall_ret(r);
	else if (fd < 0) return __syscall_ret(-EBADF);

	char buf[15 + 3*sizeof(int)];
	__procfdname(buf, fd);
	execve(buf, argv, envp);
	if (errno == ENOENT) errno = EBADF;
	return -1;
}
debug log:

solving ab81b2d3 ...
found ab81b2d3 in https://inbox.vuxu.org/musl/20210708001519.649-1-ericonr@disroot.org/
found 554c1981 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 554c1981b670f294b999295626e37b8bc5fc0b28	src/process/fexecve.c

applying [1/1] https://inbox.vuxu.org/musl/20210708001519.649-1-ericonr@disroot.org/
diff --git a/src/process/fexecve.c b/src/process/fexecve.c
index 554c1981..ab81b2d3 100644

Checking patch src/process/fexecve.c...
Applied patch src/process/fexecve.c cleanly.

index at:
100644 ab81b2d33d35144192a8c22097461061c9bebad6	src/process/fexecve.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).