display exit status of the last command
This commit is contained in:
parent
f4bf733040
commit
6f21f11429
@ -6,7 +6,7 @@
|
||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/02/05 16:21:39 by whaffman #+# #+# */
|
||||
/* Updated: 2025/02/08 19:24:05 by willem ######## odam.nl */
|
||||
/* Updated: 2025/02/09 11:17:51 by willem ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -74,7 +74,9 @@ void fork_execve(t_minishell *minishell, char *path, char **argv)
|
||||
else
|
||||
{
|
||||
free(path);
|
||||
ft_free_arr(argv);
|
||||
waitpid(pid, &status, 0);
|
||||
printf("exit status of pid(%d): %d\n", pid, (((status) & 0xff00) >> 8));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user