add ctrl-c and ctrl-d aka eof handling

This commit is contained in:
hugogogo
2021-11-10 13:46:17 +01:00
parent 0a33916c75
commit d65a701186
5 changed files with 26 additions and 116 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:59:58 by lperrey #+# #+# */
/* Updated: 2021/11/02 14:03:51 by hulamy ### ########.fr */
/* Updated: 2021/11/10 13:41:58 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,11 +15,12 @@
// Init
int init(t_all *c, char *envp[]);
int set_signals_handling(struct sigaction *ori_signal_behaviour,
struct sigaction *signal_behaviour);
int set_terminal_attributes(struct termios *ori_termios,
struct termios *interactive_termios,
int *termios_changed);
//int set_signals_handling(struct sigaction *ori_signal_behaviour,
// struct sigaction *signal_behaviour);
int set_signals_handling(struct sigaction *signal_behaviour);
//int set_terminal_attributes(struct termios *ori_termios,
// struct termios *interactive_termios,
// int *termios_changed);
// Shell modes
void shell_loop(t_all *c);