marimlem / minishell

0 stars 0 forks source link

bug: execve return should be caught #39

Closed marimlem closed 3 months ago

marimlem commented 3 months ago

minishell:$ chmod 000 minishell minishell:$ ./minishell minishell: command not found: minishell ==2295170== ==2295170== HEAP SUMMARY: ==2295170== in use at exit: 209,732 bytes in 294 blocks ==2295170== total heap usage: 2,178 allocs, 1,884 frees, 334,851 bytes allocated ==2295170== ==2295170== LEAK SUMMARY: ==2295170== definitely lost: 0 bytes in 0 blocks ==2295170== indirectly lost: 0 bytes in 0 blocks ==2295170== possibly lost: 0 bytes in 0 blocks ==2295170== still reachable: 0 bytes in 0 blocks ==2295170== suppressed: 209,732 bytes in 294 blocks ==2295170== ==2295170== For lists of detected and suppressed errors, rerun with: -s ==2295170== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) minishell:$ $? minishell: command not found: 127

======

should return

lknobloc@c3r6p6:~$ ./Documents/minishell/minishell bash: ./Documents/minishell/minishell: Permission denied

======

is currently hardcoded

marimlem commented 3 months ago

bash:$ chmod 000 minishell bash:$ ./minishell bash: ./minishell: Permission denied bash:$ echo $? 126 bash:$ ./fdsf bash: ./fdsf: No such file or directory bash:$ echo $? 127

marimlem commented 3 months ago

implemented