shell _script() use gnl() instead of readline()
to prevent copy of input to terminal. + here_doc_write_script() for nontty STDIN
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 09:22:12 by lperrey #+# #+# */
|
||||
/* Updated: 2021/12/18 04:53:11 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/18 14:22:20 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -19,6 +19,7 @@ int handle_argv(t_all *c, char *argv[]);
|
||||
int init(t_all *c, char *argv[])
|
||||
{
|
||||
ft_bzero(c, sizeof (*c));
|
||||
set_signals_behaviour();
|
||||
init_readline();
|
||||
environ = ft_dup_2d_arr(environ, (t_dup_f)ft_strdup);
|
||||
if (!environ)
|
||||
@@ -28,6 +29,5 @@ int init(t_all *c, char *argv[])
|
||||
return (ft_reti_perror(0, "init_shlvl()"));
|
||||
if (!handle_argv(c, argv))
|
||||
return (0);
|
||||
set_signals_behaviour();
|
||||
return (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user