diff --git a/42sh/includes/builtin.h b/42sh/includes/builtin.h index 22c4c3bb..98162ae9 100644 --- a/42sh/includes/builtin.h +++ b/42sh/includes/builtin.h @@ -3,9 +3,10 @@ /* ::: :::::::: */ /* builtin.h :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: jhalford +#+ +:+ +#+ */ +/* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2016/12/13 17:21:56 by jhalford #+# #+# */ +/* Created: 2017/03/14 22:59:57 by jhalford #+# #+# */ +/* Updated: 2017/03/14 22:59:57 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/plaunch_builtin.c b/42sh/src/exec/plaunch_builtin.c index 88c60800..4a937d65 100644 --- a/42sh/src/exec/plaunch_builtin.c +++ b/42sh/src/exec/plaunch_builtin.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/07 15:48:24 by jhalford #+# #+# */ -/* Updated: 2017/03/13 23:35:37 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 22:34:53 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/plaunch_file.c b/42sh/src/exec/plaunch_file.c index 4b466d72..62abe0ad 100644 --- a/42sh/src/exec/plaunch_file.c +++ b/42sh/src/exec/plaunch_file.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/07 14:53:31 by jhalford #+# #+# */ -/* Updated: 2017/03/14 21:48:36 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 22:34:06 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/process_launch.c b/42sh/src/exec/process_launch.c index 1b30ca03..f6b226e6 100644 --- a/42sh/src/exec/process_launch.c +++ b/42sh/src/exec/process_launch.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/13 22:21:19 by jhalford #+# #+# */ -/* Updated: 2017/03/13 23:10:42 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 22:34:22 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/line-editing/readline.c b/42sh/src/line-editing/readline.c index 17b476d9..336a736d 100644 --- a/42sh/src/line-editing/readline.c +++ b/42sh/src/line-editing/readline.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */ -/* Updated: 2017/03/14 21:34:46 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 22:19:43 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,7 +15,10 @@ int readline(int fd, int prompt, char **input) { if (!SH_IS_INTERACTIVE(data_singleton()->opts)) + { + DG("GNL on fd=%i", fd); return (get_next_line(fd, input) == 0); + } readline_init(prompt); *input = ft_read_stdin(); if (STR) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index d243d7c4..4db84122 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/03/14 22:51:29 by ariard ### ########.fr */ +/* Updated: 2017/03/14 23:06:10 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/main/shell_init.c b/42sh/src/main/shell_init.c index 828efaf6..a03ef260 100644 --- a/42sh/src/main/shell_init.c +++ b/42sh/src/main/shell_init.c @@ -6,13 +6,13 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */ -/* Updated: 2017/03/14 21:50:11 by jhalford ### ########.fr */ +/* Updated: 2017/03/14 22:21:28 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" -static t_cliopts shell_opts[] = +static t_cliopts g_opts[] = { {'c', NULL, SH_OPTS_LC, SH_OPTS_JOBC | SH_INTERACTIVE, NULL}, {-1, "no-jobcontrol", 0, SH_OPTS_JOBC, NULL}, @@ -40,7 +40,7 @@ static int interactive_settings(void) if (setpgid(*shell_pgid, *shell_pgid)) { ft_dprintf(2, "Couldnt put the shell in it's own process group"); - exit (1); + exit(1); } tcsetpgrp(STDIN, *shell_pgid); tcgetattr(STDIN, &data->jobc.shell_tmodes); @@ -61,7 +61,7 @@ int shell_init(int ac, char **av) } else DG("non interactive"); - if (cliopts_get(av, shell_opts, data)) + if (cliopts_get(av, g_opts, data)) return (ft_perror()); if (SH_IS_INTERACTIVE(data->opts)) interactive_settings();