This commit is contained in:
Jack Halford 2017-03-26 14:15:50 +02:00
parent f0c7252607
commit 49349c3adb
3 changed files with 8 additions and 9 deletions

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/25 18:20:42 by ariard #+# #+# */
/* Updated: 2017/03/25 21:23:11 by ariard ### ########.fr */
/* Updated: 2017/03/26 14:11:03 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/07 18:07:50 by jhalford #+# #+# */
/* Updated: 2017/03/25 20:27:32 by jhalford ### ########.fr */
/* Updated: 2017/03/26 14:11:44 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,7 +19,6 @@ void data_exit(void)
data = data_singleton();
ft_strdel(&data->line.input);
ft_strdel(&data->binary);
/* exec_popfds(); */
ft_sstrfree(data->env);
ft_sstrfree(data->local_var);
ft_sstrfree(data->argv);

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */
/* Updated: 2017/03/25 01:41:36 by wescande ### ########.fr */
/* Updated: 2017/03/26 14:13:44 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -89,10 +89,10 @@ int shell_init(int ac, char **av, char **env)
if (data_init(ac, av, env) < 0)
return (-1);
if (cliopts_get(av, g_opts, data))
return (ft_perror(NULL)
&& SH_ERR("%s", SHELL_USAGE1)
&& SH_ERR("%s", SHELL_USAGE2)
&& SH_ERR("%s", SHELL_USAGE3));
{
return (ft_perror(NULL) && SH_ERR("%s", SHELL_USAGE1)
&& SH_ERR("%s", SHELL_USAGE2) && SH_ERR("%s", SHELL_USAGE3));
}
if (!isatty(STDIN) || *data->av_data)
data->opts &= ~(SH_INTERACTIVE | SH_OPTS_JOBC);
if ((data->fd = get_input_fd(data, NULL)) < 0)