Closed marimlem closed 3 months ago
fixed segfault and leaks by catching "else" after failed execve, but now only one command not found message
minishell:$ abc | def
minishell: command not found: def
==30760==
==30760== HEAP SUMMARY:
==30760== in use at exit: 204,631 bytes in 218 blocks
==30760== total heap usage: 881 allocs, 663 frees, 240,148 bytes allocated
==30760==
==30760== LEAK SUMMARY:
==30760== definitely lost: 0 bytes in 0 blocks
==30760== indirectly lost: 0 bytes in 0 blocks
==30760== possibly lost: 0 bytes in 0 blocks
==30760== still reachable: 0 bytes in 0 blocks
==30760== suppressed: 204,631 bytes in 218 blocks
==30760==
==30760== For lists of detected and suppressed errors, rerun with: -s
==30760== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==30761==
==30761== HEAP SUMMARY:
==30761== in use at exit: 204,631 bytes in 218 blocks
==30761== total heap usage: 881 allocs, 663 frees, 240,148 bytes allocated
==30761==
==30761== LEAK SUMMARY:
==30761== definitely lost: 0 bytes in 0 blocks
==30761== indirectly lost: 0 bytes in 0 blocks
==30761== possibly lost: 0 bytes in 0 blocks
==30761== still reachable: 0 bytes in 0 blocks
==30761== suppressed: 204,631 bytes in 218 blocks
==30761==
==30761== For lists of detected and suppressed errors, rerun with: -s
==30761== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
fixed: duplicated "command not found handling" as else
write in readline is segfaulting and causing leaks