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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
#include <unistd.h>
#include <errno.h>
#include <stdarg.h>

extern int __execsh(const char *, char *const []);

int execlp(const char *file, const char *argv0, ...)
{
	int argc;
	va_list ap;
	va_start(ap, argv0);
	for (argc=1; va_arg(ap, const char *); argc++);
	va_end(ap);
	{
		int i;
		char *argv[argc+1];
		va_start(ap, argv0);
		argv[0] = (char *)argv0;
		for (i=1; i<argc; i++)
			argv[i] = va_arg(ap, char *);
		argv[i] = NULL;
		va_end(ap);
		execvp(file, argv);
		if (errno == ENOEXEC) {
			errno = 0;
			return __execsh(file, argv);
		}
		return -1;
	}
}
debug log:

solving f6da398b ...
found f6da398b in https://inbox.vuxu.org/musl/20180311134745.GA92762@fifth.space/
found 5eed886e in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 5eed886e716fa9721bf953b877df19a89bd5718f	src/process/execlp.c

applying [1/1] https://inbox.vuxu.org/musl/20180311134745.GA92762@fifth.space/
diff --git a/src/process/execlp.c b/src/process/execlp.c
index 5eed886e..f6da398b 100644

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

index at:
100644 f6da398bf83df6516edb96b012300c22b98200d8	src/process/execlp.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).