X-Git-Url: https://pd.if.org/git/?p=startuptools;a=blobdiff_plain;f=exec.c;h=bd07905b57dfad9eea220d09565a4ed0fcde053f;hp=94f319f27920e00ae41ea18631b3115c4e076ac2;hb=HEAD;hpb=11c12539d9ee64b816ad2e734b499d7ce1e83ac9 diff --git a/exec.c b/exec.c index 94f319f..bd07905 100644 --- a/exec.c +++ b/exec.c @@ -12,9 +12,14 @@ #include -void do_exec(int skip, int ac, char *av[]) { +static void do_exec(int skip, int ac, char *av[]) { int i; + if (skip >= ac) { + fprintf(stderr, "nothing to exec\n"); + exit(EXIT_FAILURE); + } + for (i=0;i