Skip to content
Snippets Groups Projects
Commit ecce3105 authored by Sébastien Gendre's avatar Sébastien Gendre
Browse files

exec_status : Finally, simply print the message requested by the teacher

parent 1c9c18e1
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,10 @@ int job_exec_command(cmd_t *cmd) {
// Exec the command found in PATH env by using execvpe()
exec_status = execvpe(cmd->argv[0], cmd->argv, NULL);
if (exec_status == -1) {
perror(cmd->argv[0]);
// In case of error, print the error message
/* perror(cmd->argv[0]); */
// Finally, simply print the message requested by the teacher
printf("Foreground job exited\n");
exit(EXIT_FAILURE);
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment