diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-11-06 20:17:34 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-11-06 20:17:34 +0100 |
commit | 87a70e527eca58cad87c14fd2a8595b8bce85e25 (patch) | |
tree | 9bbb931a9bdd16d93f6546e1e7f254ba3c3db221 /src/m_minishell.c | |
parent | C-c arrows (diff) | |
download | 42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.gz 42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.bz2 42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.xz 42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.zst 42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.zip |
major changes to ctrlc + c, no norm for now
Diffstat (limited to 'src/m_minishell.c')
-rw-r--r-- | src/m_minishell.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/m_minishell.c b/src/m_minishell.c index 987cfc0..a3226fe 100644 --- a/src/m_minishell.c +++ b/src/m_minishell.c @@ -32,6 +32,11 @@ int main(int argc, char *const argv[], char *const envp[]) ft_dprintf(STDERR_FILENO, "%s\n", strerror(errno)); return (M_RET_ALLOC); } + if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) + { + ft_dprintf(2, "minishell: innapropriate ioctl device."); + exit(1); + } ret = m_argv(argc, argv, msh); s_destroy(msh); return (ret); |