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:
Ævar Arnfjörð Bjarmason 2010-05-03 18:24:26 +00:00 committed by Karel Zak
parent e2f092d334
commit 048b81c9ff
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ int main(int argc, char *argv[])
ioprio_setpid(0, ioprio, ioclass);
execvp(argv[optind], &argv[optind]);
/* execvp should never return */
err(EXIT_FAILURE, _("execvp failed"));
err(EXIT_FAILURE, _("executing %s failed"), argv[optind]);
}
}