put the files in a real repo
[tools.git] / tools / weirdargs.c
1 /*
2  * Execute a program with weird args (e.g. an argv[0] value that doesn't match
3  * the filename or argc=0).
4  */
5
6 #include <stdio.h>
7 #include <errno.h>
8 #include <unistd.h>
9 #include <string.h>
10
11 int main(int argc, char *argv[]) {
12   execvp(argv[1], argv+2);
13   fprintf(stderr, "error: %s\n", strerror(errno));
14   return 1;
15 }