CO-CODE Hugo-Luke
+ signals handling adjusted + wait_subshell() with last_exit_status + miscs
This commit is contained in:
@@ -73,7 +73,7 @@ int fill_builtin(t_cmd *cmd, int (*builtin)(int, char **, t_all *))
|
||||
}
|
||||
|
||||
int handle_builtin(t_cmd *cmd)
|
||||
{
|
||||
{ // Il faut penser à comparer un char de plus (\0 inclus)
|
||||
if (!ft_strncmp(cmd->argv[0], "echo", 4))
|
||||
return (fill_builtin(cmd, &builtin_echo));
|
||||
// else if (!ft_strncmp(cmd->argv[0], "cd", 2))
|
||||
@@ -133,7 +133,7 @@ void fd_redirection(t_token *token, t_cmd *cmd)
|
||||
|
||||
if (token->id == T_LESS) // '<'
|
||||
{
|
||||
flag = O_RDONLY | O_CREAT;
|
||||
flag = O_RDONLY | O_CREAT; // O_CREAT ? Pourquoi donc ?
|
||||
if (cmd->fd_in != 0)
|
||||
close(cmd->fd_in);
|
||||
cmd->fd_in = open(token->next->content, flag);
|
||||
|
||||
Reference in New Issue
Block a user