diff --git a/src/command.c b/src/command.c index 400f5fe..7a55fed 100644 --- a/src/command.c +++ b/src/command.c @@ -1,5 +1,7 @@ #include "command.h" +#include +#include #include #include @@ -7,7 +9,7 @@ unsigned char invoke(struct Args args) { pid_t child = fork(); if (child == 0) { execvp(args.argv[0], args.argv); - return 1; + exit(errno); } waitpid(child, NULL, 0);