Skip to content

Commit

Permalink
norminette fully passed. Fixing a=ho 123 bug Dima pointed ou t
Browse files Browse the repository at this point in the history
  • Loading branch information
romanmikh committed Nov 6, 2024
1 parent 2b6e28f commit 47fc78e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Binary file removed minishell
Binary file not shown.
15 changes: 13 additions & 2 deletions src/execute/execute_child.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* execute_child.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rocky <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/06 16:28:49 by rocky #+# #+# */
/* Updated: 2024/11/06 16:28:51 by rocky ### ########.fr */
/* */
/* ************************************************************************** */

#include "builtins.h"
#include "libft.h"
Expand All @@ -12,7 +23,7 @@
#include "signals.h"
#include "exit_status.h"

int execute(t_ms_data *data);
int execute(t_ms_data *data);
static int new_process(t_ms_data *data);
static void signal_handler(void);
static void handle_exec_errors(char *exec_path, t_ms_data *data);
Expand Down Expand Up @@ -91,7 +102,7 @@ static int new_process(t_ms_data *data)
if (pid == -1)
ft_perror("fork");
if (pid == 0)
child_process(data); // Call the separated child process function
child_process(data);
close_fds(data->std_in, data->std_out);
waitpid(pid, &exit, 0);
data->exit_status = WEXITSTATUS(exit);
Expand Down

0 comments on commit 47fc78e

Please sign in to comment.