ionice: non-cryptic error message when ionice can't execvp
Previously ionice would reply like this when it couldn't find the command to execute: $ ionice -c 3 does-not-exist ionice: execvp failed: No such file or directory Getting that message from cron because you haven't set the right $PATH makes it hard to track down the problem. Now it says: $ ionice -c 3 does-not-exist ionice: executing does-not-exist failed: No such file or directory Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
This commit is contained in:
parent
e2f092d334
commit
048b81c9ff
|
@ -184,7 +184,7 @@ int main(int argc, char *argv[])
|
||||||
ioprio_setpid(0, ioprio, ioclass);
|
ioprio_setpid(0, ioprio, ioclass);
|
||||||
execvp(argv[optind], &argv[optind]);
|
execvp(argv[optind], &argv[optind]);
|
||||||
/* execvp should never return */
|
/* execvp should never return */
|
||||||
err(EXIT_FAILURE, _("execvp failed"));
|
err(EXIT_FAILURE, _("executing %s failed"), argv[optind]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue