summaryrefslogtreecommitdiffstats
path: root/src/m_minishell.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-11-06 20:17:34 +0100
committersalad <fmoenne-@student.le-101.fr>2020-11-06 20:17:34 +0100
commit87a70e527eca58cad87c14fd2a8595b8bce85e25 (patch)
tree9bbb931a9bdd16d93f6546e1e7f254ba3c3db221 /src/m_minishell.c
parentC-c arrows (diff)
download42-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 '')
-rw-r--r--src/m_minishell.c5
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);