No description
Find a file
Khaïs COLIN 93f3ea7c66 fix(exec): prevent leak when calling exit() in a subprocess
This was because at the point at which exit is called, we can only free a
t_simple_cmd, but not the whole t_cmd tree. This commit introduces a convention
of returning a t_subprocess enum from each function in exec. If the current
thread is a subprocess, SUBPROCESS is returned, else PARENTPROCESS. We also no
longer call exit in subproceses. This way, all processes bubble up to main,
where if SUBPROCESS is returned, all memory is freed and the program exits.

This also removes the previous should_exit convention.

Still TODO: handling of the exit builtin, which should also bubble up in the
same way.
2025-04-29 15:20:05 +02:00
libft debug: remove *alloc/free debug information 2025-03-10 13:22:29 +00:00
src fix(exec): prevent leak when calling exit() in a subprocess 2025-04-29 15:20:05 +02:00
tests debug: worddesc show more information 2025-04-15 15:17:51 +02:00
.gitignore ignore zms_tester 2025-04-16 12:48:23 +02:00
.valgrindrc valgrind: suppress readline still reachable leaks 2025-02-07 15:29:43 +01:00
grammar.md feat(redirections): allow a command composed only of redirections 2025-04-28 14:44:20 +02:00
interesting_tests.md Expansion : text replacement in a string 2025-03-21 10:04:25 +01:00
Makefile refactor(std_fds): allow for ability to store multiple std fds savesets 2025-04-28 12:49:13 +02:00
NOTES.md cmdlist: use new architecture (STUB) 2025-03-28 14:50:37 +01:00
readline.supp leaks: ignore readline add_history leaks 2025-03-28 14:50:37 +01:00
test.sh (fix) Quote removal on heredoc limiters 2025-04-28 21:37:31 +02:00