Commit 6af9886e authored by abenoit's avatar abenoit
Browse files

clean child exit

parent 997e7205
UID PID PENDING BLOCKED IGNORED CAUGHT STAT TTY TIME COMMAND
1001 3679 0000000000000000 0000000000000002 0000000000384000 0000000188013003 Ss pts/0 0:00 zsh
1001 5859 0000000000000000 0000000000000000 0000000000003000 00000001ef804eff T pts/0 0:03 vim src/main.c
1001 18370 0000000000000000 0000000000000002 0000000000384000 0000000188013003 Ss pts/1 0:00 zsh
1001 22100 0000000000000000 0000000000000000 0000000000003000 00000001ef804eff T pts/1 0:00 vim test.sh
1001 31700 0000000000000000 0000000000000000 0000000000000000 0000000000000006 S+ pts/0 0:00 ./minishell
1001 31706 0000000000000000 0000000000000000 0000000000000000 0000000000010002 S+ pts/1 0:00 sh ./test.sh
1001 31707 0000000000000000 0000000000000000 0000000000000000 00000001f3d1fef9 R+ pts/1 0:00 ps -s
1001 2372 0000000000000000 0000000000000002 0000000000384000 0000000188013003 Ss pts/0 0:00 zsh
1001 3593 0000000000000000 0000000000000000 0000000000003000 00000001ef804eff T pts/0 0:00 vim src/parsing/check_syntax.c
1001 3713 0000000000000000 0000000000000000 0000000000000000 0000000000000006 S+ pts/0 0:00 ./minishell
1001 3722 0000000000000000 0000000000000002 0000000000384000 0000000188013003 Ss pts/1 0:00 zsh
1001 3770 0000000000000000 0000000000000000 0000000000000000 0000000000010002 S+ pts/1 0:00 sh ./test.sh
1001 3771 0000000000000000 0000000000000000 0000000000000000 00000001f3d1fef9 R+ pts/1 0:00 ps -s
7
\ No newline at end of file
6
\ No newline at end of file
8
\ No newline at end of file
7
\ No newline at end of file
UID PID PENDING BLOCKED IGNORED CAUGHT STAT TTY TIME COMMAND
1001 3679 0000000000000000 0000000000000000 0000000000384000 0000000188013003 Ss+ pts/0 0:00 zsh
1001 5859 0000000000000000 0000000000000000 0000000000003000 00000001ef804eff T pts/0 0:03 vim src/main.c
1001 7175 0000000000000000 0000000000000000 0000000000000000 00000001f3d1fef9 R+ pts/1 0:00 ps -s
1001 18370 0000000000000000 0000000000000002 0000000000384000 0000000188013003 Ss pts/1 0:00 zsh
1001 22100 0000000000000000 0000000000000000 0000000000003000 00000001ef804eff T pts/1 0:00 vim test.sh
1001 31706 0000000000000000 0000000000000000 0000000000000000 0000000000010002 S+ pts/1 0:02 sh ./test.sh
......@@ -73,7 +73,7 @@ static int child_task(char **path, char **args, t_xe *xe)
if (execve(cmd, args, xe->env) == ERROR)
perror("External function error:");
free(cmd); // does not free if execve succeeds
return (SUCCESS);
return (CLEAN_EXIT);
}
static int launch_ext(char **args, t_xe *xe)
......
......@@ -26,6 +26,8 @@ void check_others(t_byte *flags, char c)
*flags -= S_R_REDIR;
if (*flags & S_L_REDIR)
*flags -= S_L_REDIR;
if (*flags & S_APPEND)
*flags -= S_APPEND;
if (*flags & S_EMPTY)
*flags -= S_EMPTY;
if (*flags & S_CMDSEP)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment