From 9e7822f80a31fe080e7706b288682007783451b8 Mon Sep 17 00:00:00 2001 From: vctrubio Date: Sat, 25 Feb 2023 12:30:10 +0100 Subject: [PATCH] eval ready. do your thing henrique --- Makefile | 1 - srcs/main.c | 2 +- srcs/piping.c | 6 +----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3b3c1c0..d00eafa 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,6 @@ LIBFT = lib/libft.a CC = gcc -# CFLAGS = -fsanitize=address CFLAGS = -Werror -Wall -Wextra -g -I $(HEADER) -fsanitize=address SRCS = $(wildcard ./srcs/*.c) diff --git a/srcs/main.c b/srcs/main.c index 4a5a8f7..3be6ca3 100755 --- a/srcs/main.c +++ b/srcs/main.c @@ -23,7 +23,7 @@ void ft_handler(int signum) if (pid == -1) { write(1, "\n", 1); - // rl_replace_line("", 0); + rl_replace_line("", 0); rl_on_new_line(); rl_redisplay(); } diff --git a/srcs/piping.c b/srcs/piping.c index 6449366..82ad57b 100755 --- a/srcs/piping.c +++ b/srcs/piping.c @@ -95,7 +95,7 @@ void pipe_commands(t_cmd *cmd) pipe_commands_build_pipes(pipes, i[2]); curr = cmd; i[0] = 0; - if (check_if_builtin_not_pipe(curr)) //PROBLEM HERE PROP + if (check_if_builtin_not_pipe(curr)) _shell()->exit_code = run_builtin((curr)); else { @@ -112,7 +112,3 @@ void pipe_commands(t_cmd *cmd) } pipe_commands_cleanup(i[2], pipes, path); } - - -//cd srcs -//-> cd is being ran twice man, cd srcs (success) cd srcs (failure becasue chdir has occured.)