Commit 3870fc15 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r4090] Give out a better error message when the file is not found.

parent 3d3457bd
......@@ -40,8 +40,16 @@ HYD_Status HYDU_Create_process(char **client_arg, int *in, int *out, int *err, i
if (in && (dup2(inpipe[0], 0) < 0))
HYDU_ERR_SETANDJUMP1(status, HYD_SOCK_ERROR, "dup2 error (errno: %d)\n", errno);
if (execvp(client_arg[0], client_arg) < 0)
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "execvp error\n");
if (execvp(client_arg[0], client_arg) < 0) {
if (errno == ENOENT) {
HYDU_ERR_SETANDJUMP1(status, HYD_INTERNAL_ERROR,
"execvp error: file %s not found\n", client_arg[0]);
}
else {
HYDU_ERR_SETANDJUMP1(status, HYD_INTERNAL_ERROR,
"execvp error (errno: %d)\n", errno);
}
}
}
else { /* Parent process */
close(outpipe[1]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment