fix: signal and \t
This commit is contained in:
parent
5d482fc65a
commit
8a2eb85dc6
@ -6,7 +6,7 @@
|
|||||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */
|
/* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */
|
||||||
/* Updated: 2023/04/05 15:13:33 by alouis-j ### ########.fr */
|
/* Updated: 2023/04/07 10:54:52 by alouis-j ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -50,7 +50,8 @@ static bool ft_executor(t_data *data, t_cmd *cmd, char **env)
|
|||||||
return (1);
|
return (1);
|
||||||
if (cmd->pid == 0)
|
if (cmd->pid == 0)
|
||||||
{
|
{
|
||||||
signal(SIGQUIT, ft_quit);
|
signal(SIGQUIT, SIG_DFL);
|
||||||
|
signal(SIGKILL, SIG_DFL);
|
||||||
dup2(cmd->fd_in[0], 0);
|
dup2(cmd->fd_in[0], 0);
|
||||||
dup2(cmd->fd_out[0], 1);
|
dup2(cmd->fd_out[0], 1);
|
||||||
ft_lstiter(*data->cmds, ft_cmdcloser);
|
ft_lstiter(*data->cmds, ft_cmdcloser);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/21 13:00:05 by cchauvet #+# #+# */
|
/* Created: 2023/02/21 13:00:05 by cchauvet #+# #+# */
|
||||||
/* Updated: 2023/04/05 15:11:16 by alouis-j ### ########.fr */
|
/* Updated: 2023/04/07 11:07:52 by alouis-j ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ static int ft_empty_verif(const char *str)
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (str[i] == ' ')
|
while (str[i] == ' ' || str[i] == '\t')
|
||||||
i++;
|
i++;
|
||||||
return (str[i] == '\0');
|
return (str[i] == '\0');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user