summaryrefslogtreecommitdiffstats
path: root/src/e_externs.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-11-09 17:57:48 +0100
committersalad <fmoenne-@student.le-101.fr>2020-11-09 17:57:48 +0100
commitb74d66ca6e9fe5ab557260e1d27299a8bd562640 (patch)
treef499009d361a959386340d719e0fd3da7a2891ce /src/e_externs.c
parentctrlc \ (diff)
download42-minishell-b74d66ca6e9fe5ab557260e1d27299a8bd562640.tar.gz
42-minishell-b74d66ca6e9fe5ab557260e1d27299a8bd562640.tar.bz2
42-minishell-b74d66ca6e9fe5ab557260e1d27299a8bd562640.tar.xz
42-minishell-b74d66ca6e9fe5ab557260e1d27299a8bd562640.tar.zst
42-minishell-b74d66ca6e9fe5ab557260e1d27299a8bd562640.zip
hellyeah brother, norm not checked because fuck lazare, new file and msh->sig
Diffstat (limited to '')
-rw-r--r--src/e_externs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/e_externs.c b/src/e_externs.c
index 6e1e75a..b184728 100644
--- a/src/e_externs.c
+++ b/src/e_externs.c
@@ -113,7 +113,7 @@ static void e_exec_path(const char fullpath[],
{
while (wait(&status) != pid)
;
- msh->ret = WEXITSTATUS(status);
+ msh->ret = (msh->sig != 0) ? msh->sig : WEXITSTATUS(status);
}
}