mailing list of musl libc
 help / color / mirror / code / Atom feed
9c2667c6d5792f8996a5761c9c3788284c31fb58 blob 437 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#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[])
{
#ifdef SYS_execveat
       return syscall(SYS_execveat, fd, "", argv, envp, AT_EMPTY_PATH);
#else
	char buf[15 + 3*sizeof(int)];
	__procfdname(buf, fd);
	execve(buf, argv, envp);
	if (errno == ENOENT) errno = EBADF;
	return -1;
#endif
}
debug log:

solving 905487e ...
found 905487e in https://inbox.vuxu.org/musl/CABpewhEt=raW3t4PJyANcpcudd5udWewOmhynfWbJ1gUJ7ty5A@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/CABpewhEt=raW3t4PJyANcpcudd5udWewOmhynfWbJ1gUJ7ty5A@mail.gmail.com/
diff --git a/src/process/fexecve.c b/src/process/fexecve.c
index 6507b42..905487e 100644

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

index at:
100644 9c2667c6d5792f8996a5761c9c3788284c31fb58	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).