/* compile with 'gcc -o exec exec.c' */
#include <unistd.h>
#include <stdio.h>
#include <errno.h>

int main (int argc, char *argv[])
{
	int ret;

	if (argc != 2) {
		printf ("Usage: %s path-to-executable\n", argv[0]);
		return 1;
	}

	ret = execv (argv[1], NULL);
	printf ("ret = %d\n", ret);
	perror ("");

	return 0;
}
