Linux debugging

Check our new training course

Linux debugging, tracing, profiling & perf. analysis

Check our new training course
with Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

#include <unistd.h>
#include <stdarg.h>

int execlp(const char *file, ...)
	int argc;
	va_list ap;
	va_start(ap, file);
	for (argc=0; va_arg(ap, const char *); argc++);
		int i;
		char *argv[argc+1];
		va_start(ap, file);
		for (i=0; i<argc; i++)
			argv[i] = va_arg(ap, char *);
		argv[i] = NULL;
		return execvp(file, argv);