diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-10 17:30:53 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-10 17:30:53 +0200 |
commit | f2e3a002967da5077a2c6f38e97025c12f4b0986 (patch) | |
tree | b43bdfa4557244258b13e1cf2b8471ee06c72427 | |
parent | Even better parse (diff) | |
download | 42-minishell-f2e3a002967da5077a2c6f38e97025c12f4b0986.tar.gz 42-minishell-f2e3a002967da5077a2c6f38e97025c12f4b0986.tar.bz2 42-minishell-f2e3a002967da5077a2c6f38e97025c12f4b0986.tar.xz 42-minishell-f2e3a002967da5077a2c6f38e97025c12f4b0986.tar.zst 42-minishell-f2e3a002967da5077a2c6f38e97025c12f4b0986.zip |
Quick update
-rw-r--r-- | TODO.org | 1 | ||||
-rw-r--r-- | src/s_com.c | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -12,6 +12,7 @@ ** TODO [#A] Fix PSX \stuff subst with "" '' ** DONE [#A] ls qweqwe; echo $? <---- substitute ** TODO [#A] <>> +** TODO [#A] SEGV on pipes ** DONE [#B] forked write(2) stuff on cd ** DONE [#B] Multiline && || ** DONE [#B] ./qwe.sh <=== handle bad shebang diff --git a/src/s_com.c b/src/s_com.c index 0f206c4..dc81046 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -28,7 +28,7 @@ static int8_t uint64_t j; i = 0; - if (words[0]) + if (words[0] != NULL) { if (((*com)->bin = (char*)malloc((ft_strlen(words[0]) + 1) * sizeof(char))) == NULL) @@ -59,7 +59,7 @@ static int8_t } static void - com_cpy_env_fork(t_com **com, + s_com_cpy_env_fork(t_com **com, t_msh *msh) { size_t i; @@ -118,11 +118,11 @@ t_com return (NULL); if ((words = p_split_args(word, com->redir)) == NULL) return (NULL); - words = p_check_args_equals(words, msh); if ((words = p_subst_home(words, msh)) == NULL) return (NULL); + words = p_check_args_equals(words, msh); if (msh->env_fork_tmp[0][0] != '\0') - com_cpy_env_fork(&com, msh); + s_com_cpy_env_fork(&com, msh); if (fill_com(words, &com) < 0) { ft_delwords(words); |