diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-03-03 00:17:36 -0600 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-03-03 00:17:36 -0600 |
| commit | f7af740cf2bccde2e6edbac31a0182fafe05d25e (patch) | |
| tree | e110bdaee77f97d6dd4931e8daa28b77e19e1f63 /src/main.c | |
| parent | 1b8967ea87c63342f03c340d44a084ea7f62cae9 (diff) | |
pipes
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -26,8 +26,7 @@ void lsh_loop(SHELL_OB *shell_obj){ int j=0; while (cmds[j]){ args = lsh_split_line(cmds[j]->cmd); - status = lsh_execute(args); - free(cmds[j]); + status = lsh_execute(args,cmds[j]); j++; int i=0; @@ -36,6 +35,11 @@ void lsh_loop(SHELL_OB *shell_obj){ free(args); } + int i=0; + while(cmds[i]){ + free(cmds[i]); + i++; + } free(cmds); free(line); } while (status); |
