Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benoit
minishell
Commits
6c9aec68
Commit
6c9aec68
authored
Feb 01, 2021
by
abenoit
Browse files
ambig redir doesn t stop token creation
parent
56c61045
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/execution/exec_handler.c
View file @
6c9aec68
...
...
@@ -105,7 +105,11 @@ int handle_execution(t_xe *xe, int fd_in, int proc)
if
(
cur_command
->
redir_types
!=
NULL
&&
cur_command
->
redir_types
[
0
]
==
AMBIG
)
{
free_command
(
cur_command
);
return
(
AMBIG_REDIR
);
if
(
ft_error
(
AMBIG_REDIR
,
xe
)
!=
SUCCESS
)
return
(
FAILURE
);
dup2
(
xe
->
backup_stdout
,
STDOUT_FILENO
);
dup2
(
xe
->
backup_stdin
,
STDIN_FILENO
);
return
(
handle_execution
(
xe
,
fd_in
,
proc
));
}
if
(
cur_command
->
args
!=
NULL
)
{
...
...
src/parsing/parsing_handler.c
View file @
6c9aec68
...
...
@@ -6,7 +6,7 @@
/* By: mvidal-a <mvidal-a@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/01 11:25:06 by mvidal-a #+# #+# */
/* Updated: 2021/02/01 1
1
:2
5:09 by mvidal-a
### ########.fr */
/* Updated: 2021/02/01 1
9
:2
0:42 by abenoit
### ########.fr */
/* */
/* ************************************************************************** */
...
...
@@ -39,6 +39,7 @@ int parse_input(char **line, char **env, int stat_loc,
return
(
FAILURE
);
return
(
SUCCESS
);
}
#include "libft.h"
t_command
*
parse_one_command
(
t_xe
*
xe
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment