Created
December 19, 2019 06:51
-
-
Save ob/4e4ffac04ab2ba0e9b619172294eafcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int | |
main(int ac, char *av[]) | |
{ | |
while (getopt(ac, av, "f:n:p:D:") != -1) { | |
// skip args | |
} | |
ac -= optind; | |
av += optind; | |
if (ac == 0) exit(1); | |
execvp(av[0], av); | |
// exec failed | |
perror("execvp"); | |
exit(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment