fix zombie process

This commit is contained in:
Chris Cromer 2021-06-28 14:03:32 -04:00
parent 5506e06840
commit f87f138f42

View File

@ -38,7 +38,8 @@ void launch_program(StringArray *args) {
argv[args->size] = NULL;
execvp(args->array[0], argv);
perror("execvpe");
fprintf(stderr, "%s: command not found\n", args->array[0]);
exit(EXIT_FAILURE);
}
else if (child < 0) {
perror("fork");