minishell:$ ls | cd fdsfs fdsf
cd: too many arguments
==2286510== Invalid read of size 4
==2286510== at 0x4059F6: playground (execute2.c:21)
==2286510== by 0x405BCD: process_handler (execute2.c:71)
==2286510== by 0x405C5F: execute_loop (execute2.c:94)
==2286510== by 0x405DE6: executor2 (execute2.c:130)
==2286510== by 0x401514: main (main.c:59)
==2286510== Address 0x4b220b8 is 120 bytes inside a block of size 128 free'd
==2286510== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2286510== by 0x404CA6: free_n_clean (free_utils.c:56)
==2286510== by 0x4059E6: playground (execute2.c:20)
==2286510== by 0x405BCD: process_handler (execute2.c:71)
==2286510== by 0x405C5F: execute_loop (execute2.c:94)
==2286510== by 0x405DE6: executor2 (execute2.c:130)
==2286510== by 0x401514: main (main.c:59)
==2286510== Block was alloc'd at
==2286510== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2286510== by 0x409C66: ft_calloc (ft_calloc.c:21)
==2286510== by 0x4013BD: main (main.c:21)
==2286510==
==2286510== Invalid read of size 4
==2286510== at 0x405A04: playground (execute2.c:22)
==2286510== by 0x405BCD: process_handler (execute2.c:71)
==2286510== by 0x405C5F: execute_loop (execute2.c:94)
==2286510== by 0x405DE6: executor2 (execute2.c:130)
==2286510== by 0x401514: main (main.c:59)
==2286510== Address 0x4b220b8 is 120 bytes inside a block of size 128 free'd
==2286510== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2286510== by 0x404CA6: free_n_clean (free_utils.c:56)
==2286510== by 0x4059E6: playground (execute2.c:20)
==2286510== by 0x405BCD: process_handler (execute2.c:71)
==2286510== by 0x405C5F: execute_loop (execute2.c:94)
==2286510== by 0x405DE6: executor2 (execute2.c:130)
==2286510== by 0x401514: main (main.c:59)
==2286510== Block was alloc'd at
==2286510== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2286510== by 0x409C66: ft_calloc (ft_calloc.c:21)
==2286510== by 0x4013BD: main (main.c:21)
while experimenting with exit codes
minishell:$ ls | cd fdsfs fdsf cd: too many arguments
==2286510== Invalid read of size 4 ==2286510== at 0x4059F6: playground (execute2.c:21) ==2286510== by 0x405BCD: process_handler (execute2.c:71) ==2286510== by 0x405C5F: execute_loop (execute2.c:94) ==2286510== by 0x405DE6: executor2 (execute2.c:130) ==2286510== by 0x401514: main (main.c:59) ==2286510== Address 0x4b220b8 is 120 bytes inside a block of size 128 free'd ==2286510== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==2286510== by 0x404CA6: free_n_clean (free_utils.c:56) ==2286510== by 0x4059E6: playground (execute2.c:20) ==2286510== by 0x405BCD: process_handler (execute2.c:71) ==2286510== by 0x405C5F: execute_loop (execute2.c:94) ==2286510== by 0x405DE6: executor2 (execute2.c:130) ==2286510== by 0x401514: main (main.c:59) ==2286510== Block was alloc'd at ==2286510== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==2286510== by 0x409C66: ft_calloc (ft_calloc.c:21) ==2286510== by 0x4013BD: main (main.c:21) ==2286510== ==2286510== Invalid read of size 4 ==2286510== at 0x405A04: playground (execute2.c:22) ==2286510== by 0x405BCD: process_handler (execute2.c:71) ==2286510== by 0x405C5F: execute_loop (execute2.c:94) ==2286510== by 0x405DE6: executor2 (execute2.c:130) ==2286510== by 0x401514: main (main.c:59) ==2286510== Address 0x4b220b8 is 120 bytes inside a block of size 128 free'd ==2286510== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==2286510== by 0x404CA6: free_n_clean (free_utils.c:56) ==2286510== by 0x4059E6: playground (execute2.c:20) ==2286510== by 0x405BCD: process_handler (execute2.c:71) ==2286510== by 0x405C5F: execute_loop (execute2.c:94) ==2286510== by 0x405DE6: executor2 (execute2.c:130) ==2286510== by 0x401514: main (main.c:59) ==2286510== Block was alloc'd at ==2286510== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==2286510== by 0x409C66: ft_calloc (ft_calloc.c:21) ==2286510== by 0x4013BD: main (main.c:21)