mailing list of musl libc
 help / color / mirror / code / Atom feed
5cac05e63576d9f066d26dd481d290d0443d3b8d blob 444 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"

void __procfdname(char *, unsigned);

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

solving 5cac05e ...
found 5cac05e in https://inbox.vuxu.org/musl/CABpewhF3K9D1cit0=aQr2mTBFiqA_w-Rg_A6ca6nML2N_86fxg@mail.gmail.com/
found 6507b42 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 6507b42949c915e757bfa71935388a0ea4e0a15d	src/process/fexecve.c

applying [1/1] https://inbox.vuxu.org/musl/CABpewhF3K9D1cit0=aQr2mTBFiqA_w-Rg_A6ca6nML2N_86fxg@mail.gmail.com/
diff --git a/src/process/fexecve.c b/src/process/fexecve.c
index 6507b42..5cac05e 100644

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

index at:
100644 5cac05e63576d9f066d26dd481d290d0443d3b8d	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).